-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add more auxillary strings to the snapshot #5411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/server/server_family.cc
Outdated
[&] { return LoadRdb(std::string(load_path), existing_keys, &snapshot_id); }); | ||
if (!load_result.has_value()) | ||
aggregated_result->first_error = load_result.error(); | ||
error_code load_result = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load_result is error_code, please rename it to result_ec or something else
src/server/server_family.cc
Outdated
else | ||
aggregated_result->first_error = load_result.error(); | ||
auto load_func = [=]() mutable { | ||
error_code load_result = LoadRdb(file, existing_keys, &load_opts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same, please rename
1605561
to
fedcc11
Compare
This PR adds aux-strings to the header of dfs files. aux-strings do not break compatibility and potentially provide better memory management and consistency checks during the snapshot load. All in all this PR should not change functionality or compatibility with older Dragonfly versons. Signed-off-by: Roman Gershman <[email protected]>
uint32_t shard_count; | ||
if (absl::SimpleAtoi(auxval, &shard_count)) { | ||
shard_count_ = shard_count; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe let's do some wrapper, because you do it a lot
This PR adds aux-strings to the header of dfs files.
aux-strings do not break compatibility and potentially provide
better memory management and consistency checks during the snapshot load.
All in all this PR should not change functionality or compatibility
with older Dragonfly versons.
Signed-off-by: Roman Gershman [email protected]