janmajayamohanty avatar image
janmajayamohanty asked

"UpdatePlayerStatisticsAsync" replaces old statistics version value with the new value during a leaderboard Reset. This happens occasionally .My aggregation method is "Sum". Is there a fix for this issue.

Leaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

May I ask what is the issue? Are there any error messages?

0 Likes 0 ·
janmajayamohanty avatar image janmajayamohanty Seth Du ♦ commented ·

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

or should become 2005.

P.S there are no errors.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Seth Du ♦ commented ·

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.

0 Likes 0 ·

0 Answers


Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.