In our game, we fetch old leaderboard to grant reward to players with ranks 1,2,3 every week after leaderboard is reset.
During a leaderboard reset if a player with rank 1 having 2000 trophies, pushes a value of 5 using UpdatePlayerStatisticsAsync, certain times his trophy statistic becomes 5 in the old statistics version which should never happen.
Ideally the statistic should
1.remain as 2000 and a new statistics version with value 5 should be created
2.it should become 2005.
P.S there are no errors.
I have done some tests on my title, however it cannot be reproduced. we suggest not to update statistics when it is being reset as for most of the shared resources, there can be delays on different shards of database.
What I know is when you are able to use GetLeaderboard to retrieve the new version of leaderboard (should be blank), the process should be done, so that UpdatePlayerStatistics can be called.
You may also add version number in the request of UpdatePlayerStatistics and manually plus one if you are not sure because there will be error messages returned if the version doesn't exist.
2 People are following this question.