-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage: IngestExternalFiles returns "external files have corrupted keys" on Mac #39696
Comments
|
I think this is a bug with pinning keys in the
|
I wonder if the edit: seems doubtful. I wonder which of the conditions are returning an unexpected result. |
Good question. It looks like |
Huh, could it be because If we initialize those in the |
Heh yep, this does the trick:
Did Clang change its treatment of uninitialized member variables across the version we use on Mac and Linux? Anyway, I'm out tomorrow, so free to turn that into a PR and use it to revert the revert of the reverted revert of Jeffrey's original PR. Let's get that in for good! |
Probably not as that stuff has been in the C++ language spec for a while. This could be due to differences in memory allocator patterns causing the members to be accidentally initialized to zero on Linux for this test, but full of garbage on Mac OS X. If my memory serves me, it is invalid to expect an STL iterator to be initialized to any value: you have to initialize it explicitly. |
If I'm reading this correctly, Note that a |
Oh, I don't think |
Closed by cockroachdb/rocksdb#44. |
@danhhz was telling me this week about how uninitialized variables can be treated differently by the compiler from an initialized variable in that the memory contents of an uninitialized variable might be ignored when reading it. Actually that conversation is what led me to this guess - if garbage data or zero data were read for these uninitialized iterators, it'd be highly unlikely to make |
BTW, how about reusing this issue to track upstreaming the fix? |
39709: storage: re-reintroduce building SSTs from KV_BATCH snapshot r=jeffrey-xiao a=jeffrey-xiao Reverts #39695. Although CI was passing for the previous introduction, tests were failing locally on Mac. These failures were diagnosed in #39696 and a fix for them is cockroachdb/rocksdb#44. Additionally, the last commit of this PR fixes an issue with the order with which we put keys in the unreplicated SST. Co-authored-by: Jeffrey Xiao <jeffrey.xiao1998@gmail.com>
Upstream fix is facebook/rocksdb#5720. |
Ingestion of SSTs with range deletion tombstones with this patch returns "external files have corrupted keys" on Macs, but not on Linux. For example,
TestImportIntoCSV
consistently fails with #39689. Removing the line where we setread_options
fixes this error.cc @nvanbenschoten @ajkr @tbg
The text was updated successfully, but these errors were encountered: