Comments (8)
At f03e7ef the same command produces panic: NextPrefix called while positioned on a span boundary
Stack:
/opt/homebrew/opt/go/libexec/src/runtime/panic.go:914 +0x218
github.com/cockroachdb/pebble/internal/keyspan.(*InterleavingIter).NextPrefix(0x140006461c0?, {0x140006461c0?, 0x1400017b728?, 0x140004a88b0?})
/Users/radu/go/src/github.com/cockroachdb/pebble/internal/keyspan/interleaving_iter.go:504 +0x15c
github.com/cockroachdb/pebble.(*Iterator).internalNextPrefix(0x140005d4f00, 0xc)
/Users/radu/go/src/github.com/cockroachdb/pebble/iterator.go:1853 +0x16c
github.com/cockroachdb/pebble.(*Iterator).nextPrefix(0x140005d4f00)
/Users/radu/go/src/github.com/cockroachdb/pebble/iterator.go:1816 +0x368
github.com/cockroachdb/pebble.(*Iterator).NextPrefix(0x10102d08b?)
/Users/radu/go/src/github.com/cockroachdb/pebble/iterator.go:1724 +0x40
github.com/cockroachdb/pebble/metamorphic.(*retryableIter).NextPrefix.func1()
/Users/radu/go/src/github.com/cockroachdb/pebble/metamorphic/retryable.go:124 +0x2c
github.com/cockroachdb/pebble/metamorphic.(*retryableIter).withRetry(0x14000310450, 0x1400017b880)
/Users/radu/go/src/github.com/cockroachdb/pebble/metamorphic/retryable.go:47 +0x34
github.com/cockroachdb/pebble/metamorphic.(*retryableIter).NextPrefix(0x14000147410?)
/Users/radu/go/src/github.com/cockroachdb/pebble/metamorphic/retryable.go:123 +0x44
github.com/cockroachdb/pebble/metamorphic.(*iterNextPrefixOp).run(0x1400031d1a0, 0x10080f98c?, {0x14000147410?, 0x10?, 0x140009073d0?})
from pebble.
#3593 fixes the NextPrefix
failure above, the original 'violates upper bound' panic still happens.
from pebble.
Looks like we violate the monotonicity during the "cascading seeks" optimization:
level 0: seekLT("bznjnemb")
level 1: seekLT("bznjnemb")
level 2: seekLT("bznjnemb")
level 3: seekLT("awudbpw")
level 4: seekLT("awudbpw")
level 5: seekLT("awudbpw")
level 6: seekLT("ecjlwuz@5")
2024/05/06 15:48:01 mergingIter: upper bound violation: level 6: ecjlwuz@5 > bznjnemb
goroutine 35 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x64
github.com/cockroachdb/pebble.(*mergingIter).seekLT(0x14000185028, {0x14006870d08?, 0x140004d1728?, 0x1007b66c0?}, 0x140004d16d8?, 0x0)
/Users/jackson/go/src/github.com/cockroachdb/pebble/merging_iter.go:1049 +0x134
github.com/cockroachdb/pebble.(*mergingIter).SeekLT(0x14000185028, {0x14006870d08?, 0x30?, 0x14008818180?}, 0x58?)
/Users/jackson/go/src/github.com/cockroachdb/pebble/merging_iter.go:1103 +0x4c
github.com/cockroachdb/pebble/internal/keyspan.(*InterleavingIter).SeekLT(0x14007195330, {0x14006870d08, 0x8, 0x18}, 0x0?)
/Users/jackson/go/src/github.com/cockroachdb/pebble/internal/keyspan/interleaving_iter.go:370 +0xd8
github.com/cockroachdb/pebble.(*Iterator).iterLastWithinBounds(0x14000184a08)
/Users/jackson/go/src/github.com/cockroachdb/pebble/iterator.go:2099 +0x50
github.com/cockroachdb/pebble.(*Iterator).PrevWithLimit(0x14000184a08, {0x0, 0x0, 0x0})
/Users/jackson/go/src/github.com/cockroachdb/pebble/iterator.go:2060 +0x1f8
github.com/cockroachdb/pebble.(*Iterator).Prev(...)
/Users/jackson/go/src/github.com/cockroachdb/pebble/iterator.go:1978
github.com/cockroachdb/pebble/metamorphic.(*retryableIter).Prev.func1()
/Users/jackson/go/src/github.com/cockroachdb/pebble/metamorphic/retryable.go:132 +0x38
github.com/cockroachdb/pebble/metamorphic.(*retryableIter).withRetry(0x1400a292870, 0x140004d18a0)
/Users/jackson/go/src/github.com/cockroachdb/pebble/metamorphic/retryable.go:47 +0x34
github.com/cockroachdb/pebble/metamorphic.(*retryableIter).Prev(0x10?)
/Users/jackson/go/src/github.com/cockroachdb/pebble/metamorphic/retryable.go:131 +0x44
github.com/cockroachdb/pebble/metamorphic.(*iterPrevOp).run(0x14009b1ce70, 0x0?, {0x14009a18540?, 0x14006174830?, 0x14000b66cc0?})
/Users/jackson/go/src/github.com/cockroachdb/pebble/metamorphic/ops.go:1738 +0xa8
github.com/cockroachdb/pebble/metamorphic.(*Test).runOp(0x140004d1a38?, 0x100ed01d8?, {0x14009a18540?, 0x1011b6280?, 0x14000b66cc0?})
/Users/jackson/go/src/github.com/cockroachdb/pebble/metamorphic/test.go:415 +0x104
github.com/cockroachdb/pebble/metamorphic.(*Test).step(0x14008c8f8c0, 0x100edef64?, 0xe?)
/Users/jackson/go/src/github.com/cockroachdb/pebble/metamorphic/test.go:401 +0x4c
github.com/cockroachdb/pebble/metamorphic.(*Test).Step(0x14008c8f8c0)
/Users/jackson/go/src/github.com/cockroachdb/pebble/metamorphic/test.go:390 +0x7c
github.com/cockroachdb/pebble_test.TestIteratorErrors(0x140002869c0)
/Users/jackson/go/src/github.com/cockroachdb/pebble/external_test.go:93 +0x750
testing.tRunner(0x140002869c0, 0x101289068)
/usr/local/go/src/testing/testing.go:1689 +0xec
created by testing.(*T).Run in goroutine 1
/usr/local/go/src/testing/testing.go:1742 +0x318
from pebble.
maybe an unsurfaced iterator error still?
from pebble.
It looks like it's been a problem for a while, I can repro failures on 2 week old commits.
from pebble.
I'm still debugging, but it looks like a levelIter
's rangeDelIterPtr
is mysteriously nil while the corresponding mergingIterLevel
's rangeDelIter
is populated with a real (stale?) range deletion iterator. I'm a bit baffled.
from pebble.
Ah, I think it's an ingested flushable so the rangeDelIter is actually an independent keyspanimpl.LevelIter. That makes more sense.
from pebble.
Somethings up with the keyspan.LevelIter
.
The sequence is something like:
- We call
keyspan.SeekLE(k)
to seek the ingested flushable's range del iter to a span covering a key ≤ k. - This first performs a
FragmentIterator.SeekGE(k)
. This exhausts the iterator, indicating that there's no span covering a key ≥ k. - Then
keyspan.SeekLE
callsFragmentIterator.Prev
, expecting to land on the largest span covering a key < k. This actually returns a span covering a key > k that the originalSeekGE(k)
should have surfaced.
from pebble.
Related Issues (20)
- db: seek performance HOT 3
- github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed HOT 19
- db: avoid loading skiplist size during concurrent apply HOT 2
- replay: add support for capturing and replaying read operations
- meta: add metamorphic CPU work granter HOT 1
- meta test failure HOT 3
- db: avoid loading later files for a level in SeekPrefixGE
- internal/metamorphic/crossversion/crossversion_test: TestMetaCrossVersion failed
- : failed HOT 1
- github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed HOT 6
- : failed HOT 5
- github.com/cockroachdb/pebble/internal/metamorphic: TestMetaTwoInstance failed HOT 6
- github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed HOT 3
- : failed HOT 1
- : failed HOT 2
- github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed HOT 15
- : failed HOT 9
- external ingest: fix bloom filters when synthetic prefix is used
- loong64 arch undefined array length maxArrayLen or missing type constraint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pebble.