-
Notifications
You must be signed in to change notification settings - Fork 465
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
TestIteratorErrors fails with SeekLT violates upper bound panic #3592
Comments
At f03e7ef the same command produces Stack:
|
This commit fixes a few issues surrounding NextPrefix and iterator errors. Previously, under some circumstances, an error propagated by the underlying iterator would not immediately be propagated up. Instead the Iterator could in some circumstances call Next or NextPrefix on an already exhausted, errored iterator, resulting in undefined behavior. Similarly, the results of calling NextPrefix on an exhausted top-level pebble.Iterator are not defined. This commit adapts the implementation to early exit in this case. The metamorphic test may generate such operations. Fix cockroachdb#3592.
#3593 fixes the |
Looks like we violate the monotonicity during the "cascading seeks" optimization:
|
maybe an unsurfaced iterator error still? |
It looks like it's been a problem for a while, I can repro failures on 2 week old commits. |
I'm still debugging, but it looks like a |
Ah, I think it's an ingested flushable so the rangeDelIter is actually an independent keyspanimpl.LevelIter. That makes more sense. |
Somethings up with the The sequence is something like:
|
When an ingested flushable creates a range deletion iterator, it uses the keyspanimpl.LevelIter to expose a unified view of all the range deletions across the files of the atomically ingested sstables. When loading a sstable's range deletion iterator failed, it returned a non-nil iterator to work around idiosyncroncies of the keyspanimpl.LevelIter. This could cause the LevelIter to mistakenly think it had already loaded a file's range deletions. This commit fixes ingestedFlushable.constructRangeDelIter to return a nil FragmentIterator if there's an error, and refactors (keyspanimpl.LevelIter).loadFile. Fix cockroachdb#3592.
When an ingested flushable creates a range deletion iterator, it uses the keyspanimpl.LevelIter to expose a unified view of all the range deletions across the files of the atomically ingested sstables. When loading a sstable's range deletion iterator failed, it returned a non-nil iterator to work around idiosyncroncies of the keyspanimpl.LevelIter. This could cause the LevelIter to mistakenly think it had already loaded a file's range deletions. This commit fixes ingestedFlushable.constructRangeDelIter to return a nil FragmentIterator if there's an error, and refactors (keyspanimpl.LevelIter).loadFile. Fix cockroachdb#3592.
This commit fixes a few issues surrounding NextPrefix and iterator errors. Previously, under some circumstances, an error propagated by the underlying iterator would not immediately be propagated up. Instead the Iterator could in some circumstances call Next or NextPrefix on an already exhausted, errored iterator, resulting in undefined behavior. Similarly, the results of calling NextPrefix on an exhausted top-level pebble.Iterator are not defined. This commit adapts the implementation to early exit in this case. The metamorphic test may generate such operations. Fix #3592.
When an ingested flushable creates a range deletion iterator, it uses the keyspanimpl.LevelIter to expose a unified view of all the range deletions across the files of the atomically ingested sstables. When loading a sstable's range deletion iterator failed, it returned a non-nil iterator to work around idiosyncroncies of the keyspanimpl.LevelIter. This could cause the LevelIter to mistakenly think it had already loaded a file's range deletions. This commit fixes ingestedFlushable.constructRangeDelIter to return a nil FragmentIterator if there's an error, and refactors (keyspanimpl.LevelIter).loadFile. Fix #3592.
TestIteratorErrors
runs intoCan reproduce at 0bc137a with
https://github.com/cockroachdb/pebble/actions/runs/8973148304/job/24642661778?pr=3590
The text was updated successfully, but these errors were encountered: