an_toni.a
09/19/2024, 5:16 AMcsharp
else if (nextUnsynchronizedServerAction.TrackingId != unsynchronizedServerActionMarker.TrackingId)
{
//_log.Warning("Unsynchronized server action rejected. Out of order. Expected id {ExpectedId}, got: {ActionId}", nextUnsynchronizedServerAction.TrackingId, unsynchronizedServerActionMarker.TrackingId);
_log.Warning("Unsynchronized server action detected as Out of order. Expected id {ExpectedId}, got: {ActionId}. HACK FIX: am tolerating this! --antont", nextUnsynchronizedServerAction.TrackingId, unsynchronizedServerActionMarker.TrackingId);
//throw new InvalidOperationException($"PlayerFlushActions, trying to re-order Unsynchronized Server Action");
}an_toni.a
09/19/2024, 9:35 AMJurjen
09/20/2024, 9:03 AMExecuteServerActionImmediately tries to prevent callers from non-actor-current thread exactly to avoid races. Not sure why that didn't work here. But with sync calls, I don't really see how the order could get mixed up in the first place.
A tip: if you have async operations that may complete in various orders, one easy way to order/linearize them is to use ExecuteOnActorContextAsync and push the result handling to the actor thread. So in this case, we could compute stuff in the async continuation, but finally to apply the result, we could do ExecuteOnActorContextAsync(() => ExecuteServerActionImmediately(action))an_toni.a
09/23/2024, 9:41 AMan_toni.a
09/24/2024, 5:24 AMan_toni.a
09/24/2024, 2:11 PMan_toni.a
09/24/2024, 2:11 PMan_toni.a
09/24/2024, 2:12 PM2024-09-24 14:42:10.992
[11:42:10.992 WRN Player:P7YuheTk4z] Unsynchronized server action detected as Out of order. Expected id 16, got: 24. HACK FIX: am tolerating this! --antont
2024-09-24 14:39:02.129
[11:39:02.129 WRN Player:P7YuheTk4z] Unsynchronized server action detected as Out of order. Expected id 15, got: 22. HACK FIX: am tolerating this! --antont
2024-09-24 14:35:03.764
[11:35:03.764 WRN Player:P7YuheTk4z] Unsynchronized server action detected as Out of order. Expected id 11, got: 20. HACK FIX: am tolerating this! --antont
2024-09-24 14:31:07.502
[11:31:07.501 WRN Player:P7YuheTk4z] Unsynchronized server action detected as Out of order. Expected id 10, got: 18. HACK FIX: am tolerating this! --antontan_toni.a
09/24/2024, 2:13 PMan_toni.a
10/02/2024, 9:49 AM