-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Hex decode add-prefix and remove-prefix for fdbrestore. #11344
Hex decode add-prefix and remove-prefix for fdbrestore. #11344
Conversation
fdbbackup/backup.actor.cpp
Outdated
// into the binary string. Set "err" to true if the format is invalid. | ||
// Note ',' '\' '," ';' are escaped by '\'. Normal characters can be | ||
// unencoded into HEX, but not recommended. | ||
std::string decode_hex_string(std::string line, bool& err) { |
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 refactor this into a separate file to be shared with FileDecoder.actor.cpp
.
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.
I did that. Added Decode.cpp.
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
@newhook , do you mind porting this to the |
This is fix for #1537.
--add-prefix
and--remove-prefix
command line arguments to fdbrestore are not hex decoded.This also fixes a bug in the original
decode_hex_string
implementation where an error condition is not correctly flagged.I tested the implementation locally and it works as expected.
Once this PR is merged I can create a fix against main.
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branch
ormain
if this is the youngest branch)