-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
I'm seeing something that indicates a bug with range key defragmentation and block property filters.
In #86256, I'm adding a metamorphic test parameter for TestMVCCHistories
which causes Pebble to use very small blocks, and to flush after every write operation. Try running this a few times:
dev test pkg/storage -f 'TestMVCCHistories' --ignore-cache -v --rewrite
Quite often (depending on the metamorphic parameters), this will generate changes in export
and range_key_iter_incremental
that either truncate range keys (so e.g. [a-k)
is truncated to [a-b)
), or fragments disappear completely (e.g. [b-c)
disappears from a longer chain of connected fragments). This leads me to suspect a bug in Pebble defragmentation, since I don't see any mechanism in CRDB that would truncate range keys like this.
Both of these test cases use MVCCIncrementalIterator
, using a TBI paired with a normal iterator. However, it must be the normal iterator that's surfacing these truncated range keys -- it's still a bit unclear what's happening.
See also cockroachdb/pebble#1895.
Jira issue: CRDB-18652
Epic CRDB-2624