Skip to content
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

BlobIndex will be broken and failed to decode when zero-terminated in blob handle in compaction filter #321

Open
mzygQAQ opened this issue Jun 12, 2024 · 2 comments · May be fixed by #322

Comments

@mzygQAQ
Copy link
Contributor

mzygQAQ commented Jun 12, 2024

Slice original_value(value.data());

Slice(const char* s) will step foward util met '\0', it will broken the the blob index and DecodeFrom will be failed.

@Connor1996
Copy link
Member

Yes, seems should use value directly. Would you like to fix it?

@mzygQAQ
Copy link
Contributor Author

mzygQAQ commented Jun 19, 2024

@Connor1996 It seems that fixing it or not does not affect the correctness of tikv/titan. O^O !
Filenumber/offset/length is encoded using varints. Due to the nature of varints, only when the value is 0 will the encoded byte contain 0. Due to the file header, filenumber/offset/length in titan cannot be 0. I encountered this error because I added something else in blobIndex in my version ~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants