Repository navigation
refactor: move the AOF record to request converter into ember-core - #415
Merged
Merged
Conversation
aof_record_to_shard_request lived in the server's replication module, while its inverse, to_aof_records, is in the shard. It is now ember_core::from_aof_record next to it, so recovery can use it too.
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.
aof_record_to_shard_requestturns anAofRecordinto theShardRequestthat repeats its write. Replicas use it to apply the primary's stream. It lived inember-server/src/replication.rs, while its inverse,to_aof_records, is inember-core/src/shard/aof.rs.It moves next to its inverse as
ember_core::from_aof_record, with its two tests. Behavior is unchanged.This prepares the next change: shard recovery will replay the AOF through this converter and the keyspace, instead of the separate replay in
ember-persistence/src/recovery.rs, which repeats the effect of every write command against aHashMap.