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.
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.