release-23.1.0: go.mod: bump Pebble to 0a342eccdea0 #102070
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
0a342ecc crl-release-23.1: db: fix bug with restricted checkpoints
fb56da99 sstable: include SINGLEDELs within NumDeletions table property
8a10d6a0 sstable: reuse block property filterers in all cases
Informs #100935.
Release note: None
Epic: none
Release justification: one commit fixes a bug where in some cases store checkpoints (generated when replica mismatches are detected) cannot be opened. This can be a big problem when debugging production issues. One commit fixes store statistics that are used to make compaction decisions. One commit is a performance improvement that offsets a performance regression.
crl-release-23.1: db: fix bug with restricted checkpoints
Backport of cockroachdb/pebble#2460 for 23.1.x
When a checkpoint is restricted to a set of spans, we append a record
to the checkpoint's manifest removing all the excluded ssts.
We append the record after copying the raw data from the existing
manifest. This is not quite ok: the
record
library works by breakingup records in chunks and packing chunks into 32KB blocks. Chunks
cannot straddle a 32KB boundary, but this invariant is violated by our
append method. In practice, this only happens if the record we are
appending is big and/or we are very unlucky and the existing manifest
is close to a 32KB boundary.
To fix this: instead of doing a raw data copy of the existing
manifest, we copy at the record level (using a record reader and a
record writer). Then we can add a new record using the same writer.
sstable: include SINGLEDELs within NumDeletions table property
Previously, the sstable property recording the number of deletion tombstones
within a file included DELs and RANGEDELs but not SINGLEDELs. This caused
SINGLEDELs to be excluded from point tombstone compaction heuristics that use
these properties to estimate the amount of disk space that may be reclaimed by
compacting a file.
sstable: reuse block property filterers in all cases
Previously, if block-property filters were in use and a sstable was found to
NOT intersect the filters, the allocated BlockPropertiesFilterer was dropped
instead of being returned to the pool.
This commit refactors the sstable package's interface to hide the
IntersectsUserPropsAndFinishInit function's subtle semantics behind a new
IntersectsTable function that returns a new filterer if the table intersects
the provided filters. If the table does not intersect the provided filters, the
obtained filterer is automatically returned to the sync pool.