Open mzygQAQ opened 4 months ago
Yes, seems should use value
directly. Would you like to fix it?
@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 ~~
https://github.com/tikv/titan/blob/ecaa9ecda94443a183e7361669ca35f8e17c6c7d/src/compaction_filter.h#L73
Slice(const char* s) will step foward util met '\0', it will broken the the blob index and DecodeFrom will be failed.