Closed Lyncis closed 6 years ago
@joemarct Could you take a look at this?
I've tested it on the master and I have the same values in the leaderboard-data
and stats
.
Also, I completely remade leaderboard-data
in the performance
branch, so I prefer to wait for the merge and after that develop the changes if required.
And a question, @shawnlauzon is it correct that users with the same points have a different rank?
Ok, that seems reasonable. @alexdashkov please create a PR for merging into master and ask @joemarct to review it.
Yes, users with same points will have different ranks; the ranking can be arbitrary (although ideally the first user who earned a certain number of points should be ranked higher), but consistent.
@shawnlauzon do you mean a PR with the leaderboard data? @realrhys has said that that he will merge a performance
branch to the master by the end of testing.
Yes, with the leaderboard data. Now this is more than a performance fix, it's possibly a correctness fix. So I want it in master so that we can complete our integration testing. Performance testing can happen in parallel in the performance
branch, and if there are additional performance fixes, they can be merged later.
@shawnlauzon I'm not sure yet that this a bug fix as I can't reproduce the problem. I'm waiting for the @Lyncis's response. Does it make sense?
Talked to Alex, PR is coming up.
I pulled the last changes on the server, still have the same issue,
Trying to explain it again.
I go to http://localhost:8000/docs/ Authenticate as ironman:
Then I retrieve leaderboard-data with this user, I see that his rank is 10.
Then I go to retrieve user stats and see that his overall_rank is 10
Then if I log in as spiderman and retrieve leaderboard-data, his rank is 9 here
But if I go to the user stats, his overall_rank is 10 as it was for ironman
Same is for hawkeye and other who has the same number of tokens. As for other users, their rank is displayed correctly.
I also noticed that when I am retrieving leadreboard for these users, they quite often have different ranks. For example, spiderman can have rank 9, and on the next time he can have rank 7. In the user_stats though, it is always the same for all of them.
Seems like this is an issue only locally, everything works fine on uat and dev.
I'm going to close this as a duplicate of Volentix/venue#257; better to have a single issue for a single problem.
I've noticed that different users with the same number of tokens have the same overall rank in the user stats.
To be more detailed, if I go to http://localhost:8000/api/retrieve/leaderboard-data/ I get the following result:
Then I go to localhost:8000/docs, log in as spiderman, then go to retrieve/stats, I get this:
So, in the leaderboard-data spiderman has rank 8, but in the user stats his rank is 9. And it is the same for every user with the same number of tokens as a spiderman.
I don't know if it should be like that or if this needs to be fixed. Leaderboard hilhlighting is not displayed correclty in some cases and it seems like it is because of this rank in user stats.