Port CRDT key expiry from akka-core #31721#2733
Open
pjfanning wants to merge 6 commits intoapache:mainfrom
Open
Port CRDT key expiry from akka-core #31721#2733pjfanning wants to merge 6 commits intoapache:mainfrom
pjfanning wants to merge 6 commits intoapache:mainfrom
Conversation
Co-authored-by: pjfanning <11783444+pjfanning@users.noreply.github.com>
…ired now param Co-authored-by: pjfanning <11783444+pjfanning@users.noreply.github.com>
Member
|
Should we wait this on 3.17? |
Member
Author
|
March 16 (today) is ok - https://github.com/akka/akka-core/blob/v2.8.0/LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the CRDT key expiry feature from akka/akka-core#31721 with imports updated for Pekko. Allows
Replicatorentries to be automatically removed (without tombstones) after a configurable period of inactivity.part of #2730
Configuration
Prefix wildcard (
*) matching supported.Changes
Classic API (
distributed-data)Expired[A]subscribe response (alongsideChanged/Deleted) sent to subscribers when a key is evictedReplicatorSettingsgainsexpiryKeys: Map[KeyId, FiniteDuration]with backward-compat constructor,withExpiryKeys()Scala/Java API, andparseExpiry()helperdataEntriesextended from(DataEnvelope, Digest)to(DataEnvelope, Digest, Timestamp)to track last-used time per keyreceiveGet,receiveUpdate,receiveDeletecleanupExpired()runs on every gossip tick; expired entries removed and subscribers notifiedStatus/Gossipmessages) now carriesusedTimestampso all replicas share expiry clock state — entries received via gossip that are already expired are discardedDurable store
Expire(keys: Set[KeyId])message added toDurableStoreprotocolLmdbDurableStorehandlesExpirevia newdbDelete(keys)methodSerialization
ReplicatorMessages.proto: optionalsint64 usedTimestamp = 3added toStatus.EntryandGossip.EntryReplicatorMessages.javaupdated accordingly (zero value = unset; backward-compatible)ReplicatorMessageSerializerupdated to read/write timestampsTyped API (
cluster-typed)Expired[A]type alias added toscaladsl.ReplicatorExpired[A]case class added tojavadsl.ReplicatorReplicatorBehaviorforwards classicExpiredto Java API subscribers