question

yizhoupan avatar image
yizhoupan asked

Player entered segment event not triggered.

Hi,

We met a problem about player segment event in our game.

We have a statistic called "Halloween_Score", and a leader board of that stat. Because the leader board resets daily at UTC 12:00 am, the "Halloween_Score" should be reset to 0 after that. The "Halloween_Score" is changed from the client after the player finishes a level(So it changes several times every day) and count by SUM. And we also have 3 player segments which require players' "Halloween_Score" to be equal or larger than a threshold value(100,500,1500). Once the player entered the segment, the segment will execute a cloudscript called "GiveSystemGiftToAll". This whole process works as expected with thousands of active users.

But today, a player said he didn't receive the message of system gift event though his score is way higher than the threshold. After checking his event history, we found that:

At 12:01 AM, there was a leaderboard reset event. So his score should be reset to 0.

At 12:06 AM, his statistic value of "Halloween Score" is 1521, so he supposed to enter the segment and trigger the event. But there was no record of that event.

You can check his event history during that time here. Event History

In comparison, you can check the event history of another player at 12:03AM. Event History

And this is our segment: Segement

As most users don't have this problem, we do get confused by this issue. We wonder if there is anything wrong with our configuration?

Thanks,

Player Data
10 |1200

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

1 Answer

·
brendan avatar image
brendan answered

Actually, the Action was triggered. We're adding a new event shortly which will help with this (it's specifically going to be "action triggered", effectively). What happened is that the Cloud Script failed, which caused the Action to be cancelled. Looking at the title, I do see that you're getting a fair number of concurrent edit errors - those specifically indicate an issue where multiple attempts are being made simultaneously to update a particular piece of data (like the player inventory). If two processes try to update the same data at the same moment, only one will succeed. The other gets bounced with the concurrent edit error.

I also need to point out that you're getting an awful lot of rate limit exceeded errors: https://developer.playfab.com/en-US/8EC/playstream/event-history?query=dGl0bGVfZXhjZWVkZWRfbGltaXQ=&sumBy=&termsField=

These indicate an attempt to exceed the safe limits for the calls in question - updating user data, in this case. You should be targeting a few calls per minute, on average over the lifetime of the player session (so, bursts are fine occasionally, like at the end of a level, as long as the average is reasonable). I'd recommend addressing that, as right now every attempted write that exceeds the limit is failing.

1 comment
10 |1200

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

yizhoupan avatar image yizhoupan commented ·

Hi Brendan, thanks for your answer. It's very useful to us. We looked into the limit exceeded errors that you pointed out. Although we have handled the process of changing player title data in the client, we missed some situations which change title data from cloudscript.

0 Likes 0 ·

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.