Add support of stream migration during slot migration process#1197
Merged
PragmaTwice merged 3 commits intoapache:unstablefrom Dec 21, 2022
Merged
Add support of stream migration during slot migration process#1197PragmaTwice merged 3 commits intoapache:unstablefrom
PragmaTwice merged 3 commits intoapache:unstablefrom
Conversation
PragmaTwice
reviewed
Dec 19, 2022
PragmaTwice
reviewed
Dec 19, 2022
PragmaTwice
approved these changes
Dec 20, 2022
git-hulk
approved these changes
Dec 20, 2022
caipengbo
approved these changes
Dec 21, 2022
| bool MigrateSimpleKey(const rocksdb::Slice &key, const Metadata &metadata, const std::string &bytes, | ||
| std::string *restore_cmds); | ||
| bool MigrateComplexKey(const rocksdb::Slice &key, const Metadata &metadata, std::string *restore_cmds); | ||
| bool MigrateStream(const rocksdb::Slice &key, const StreamMetadata &metadata, std::string *restore_cmds); |
Contributor
There was a problem hiding this comment.
By the way, this type of functions uses bool as its return value. I think it's a more elegant way to return Status, and move the LOG information from these internal functions to Status Msg, and return it to the upper level.
Member
There was a problem hiding this comment.
We can refactor them in further PRs : )
Member
|
Thanks all. Merging... |
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.
The
XSETIDcommand was implemented. This command is used only during stream key migration.It differs from the same
Rediscommand just in one case: inRedis, you can't apply it to a non-existing stream; inKvrocksyou can because streams are allowed to be empty and there should be a way to migrate an empty stream (with no priorXADDcommand which can create a stream if it doesn't exist).Related C++ unit tests were added.
Stream key migration was implemented. The key of the
streamtype is migrated via a separate function.Related Go tests were added.
Refactor and tidy cluster-related code (
src/clusterfolder).Closes #1087