Skip to content

storage: MVCC range keys sometimes omitted by MVCCIncrementalIterator #86260

@erikgrinaker

Description

@erikgrinaker

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

Metadata

Metadata

Assignees

Labels

A-storageRelating to our storage engine (Pebble) on-disk storage.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.branch-release-22.2Used to mark GA and release blockers, technical advisories, and bugs for 22.2release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions