richardartoul / nola

MIT License
74 stars 6 forks source link

Fix bug causing stale cache entries #78

Closed richardartoul closed 1 year ago

richardartoul commented 1 year ago

When using the leader registry the value of versionstamp is only guaranteed to increase for a given leader. Once a leader transition occurs, the value may reset back. This would cause the activations cache to incorrectly hold on to extremely stale actor references for a long period of time. This P.R fixes the bug by ensuring we only retain the value with the highest version stamp if the server IDs match, otherwise we always accept the upsert.