question

lylecox avatar image
lylecox asked

GetPlayerStatistics inconsistent and inaccurate response

This appears to happen easily after a statistic version is updated while testing with just one player.

When calling /Server/GetPlayerStatistics and requesting a single statistic name with a specific version sometimes the response will have an empty array for Statistics when there should be a value. There is no error code to indicate the data might be wrong.


This can happen between multiple calls of actually getting a value for the same player for the same statistic version.

Do you know why this would be happening? Is it something that can be fixed?

Leaderboards and Statistics
3 comments
10 |1200

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

Andy avatar image Andy ♦♦ commented ·

How far apart in time are the requests that return different values?

0 Likes 0 ·
lylecox avatar image lylecox Andy ♦♦ commented ·

A second or two.

0 Likes 0 ·
Andy avatar image Andy ♦♦ lylecox commented ·

A second or two should be long enough to avoid any database concurrency issues that I was originally suspecting. I'm checking with the dev team to see if they have any ideas.

0 Likes 0 ·

1 Answer

·
Brian Jordan avatar image
Brian Jordan answered

We get these intermittently as well (about 3 in 1000 calls). In our case we can't differentiate between a failed get and a new player and it causes data loss. How are we meant to handle these empty results when the player does have non-empty results we don't want to overwrite?

10 |1200

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

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.