Skip to content

Tags: cockroachdb/pebble

Tags

v2.1.6

Toggle v2.1.6's commit message
rowblk: fix IsLowerBound to account for synthetic suffix

`Iter.firstUserKey` has the synthetic prefix prepended but the on-disk
suffix is preserved; suffix replacement is only applied per-returned key
via `maybeReplaceSuffix`. Comparing `firstUserKey` directly against the
probe could return true even though the iterator's actual first key
(after synthetic suffix replacement) sorts strictly less than the probe,
violating the `blockiter.Data.IsLowerBound` contract.

When a synthetic suffix is in effect, only compare the prefix portion of
`firstUserKey` and require it to be strictly greater than the probe. The
contract permits false negatives, so this conservative comparison is
sound and avoids reasoning about the unknown suffix.

Adds `TestIsLowerBoundRandomized` which cross-checks `IsLowerBound`
against `First()` across random blocks and transform combinations, and
documents the transform state of `firstUserKey`.

v2.0.9

Toggle v2.0.9's commit message
rowblk: fix IsLowerBound to account for synthetic suffix

`Iter.firstUserKey` has the synthetic prefix prepended but the on-disk
suffix is preserved; suffix replacement is only applied per-returned key
via `maybeReplaceSuffix`. Comparing `firstUserKey` directly against the
probe could return true even though the iterator's actual first key
(after synthetic suffix replacement) sorts strictly less than the probe,
violating the `blockiter.Data.IsLowerBound` contract.

When a synthetic suffix is in effect, only compare the prefix portion of
`firstUserKey` and require it to be strictly greater than the probe. The
contract permits false negatives, so this conservative comparison is
sound and avoids reasoning about the unknown suffix.

Adds `TestIsLowerBoundRandomized` which cross-checks `IsLowerBound`
against `First()` across random blocks and transform combinations, and
documents the transform state of `firstUserKey`.

v2.1.5

Toggle v2.1.5's commit message
db: error when opening a database in format major version 1

Format major version 1 (`FormatMostCompatible`) predates the
`format-version` marker file and uses a `CURRENT` file rather than the
atomic `manifest` marker. When opening such a database,
`lookupFormatMajorVersion` returned `FormatDefault` and
`findCurrentManifest` reported no manifest, so `Open` treated the
directory as a fresh store and overwrote the existing data.

The existing `ErrorIfNotPristine` safeguard only fires during WAL replay
or after a successful manifest recovery, neither of which happens for a
v1 store, so the safeguard was bypassed.

Detect the legacy state in `Open` by scanning the directory listing for
a `CURRENT` file when no `format-version` marker is present, and return
an error indicating that format major version 1 is no longer supported.
The check runs before any destructive work. `CURRENT` is the unambiguous
v1 signal: real v1 stores always have it, and modern Pebble never writes
it. We deliberately do not flag directories with `MANIFEST-*` but no
`CURRENT`, because that state can also occur transiently when a modern
store crashes mid-creation; that case is handled by `ErrorIfNotPristine`.

Fixes #5969.

Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>

v2.0.8

Toggle v2.0.8's commit message
db: error when opening a database in format major version 1

Format major version 1 (`FormatMostCompatible`) predates the
`format-version` marker file and uses a `CURRENT` file rather than the
atomic `manifest` marker. When opening such a database,
`lookupFormatMajorVersion` returned `FormatDefault` and
`findCurrentManifest` reported no manifest, so `Open` treated the
directory as a fresh store and overwrote the existing data.

The existing `ErrorIfNotPristine` safeguard only fires during WAL replay
or after a successful manifest recovery, neither of which happens for a
v1 store, so the safeguard was bypassed.

Detect the legacy state in `Open` by scanning the directory listing for
a `CURRENT` file when no `format-version` marker is present, and return
an error indicating that format major version 1 is no longer supported.
The check runs before any destructive work. `CURRENT` is the unambiguous
v1 signal: real v1 stores always have it, and modern Pebble never writes
it. We deliberately do not flag directories with `MANIFEST-*` but no
`CURRENT`, because that state can also occur transiently when a modern
store crashes mid-creation; that case is handled by `ErrorIfNotPristine`.

Fixes #5969.

Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>

v2.1.4

Toggle v2.1.4's commit message
go.mod: use v0.1.0 for axisds

I published axisds commit 5135a0650657 as v0.1.0 to hopefully help
with version resolution.

Informs #5693

v2.1.3

Toggle v2.1.3's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Enable Go 1.26 support

Update github.com/cockroachdb/swiss to include Go 1.26 support from
* cockroachdb/swiss#50

v2.1.2

Toggle v2.1.2's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
feat: add pebblegozstd build tag to allow to configure zstd lib

Add a build tag that lets developers choose the zstd library. The
current cgo implementation dramatically slows down builds and tests,
and it blocks non‑cgo projects from running tests with the race
detector unless they also switch the underlying library.

v2.1.1

Toggle v2.1.1's commit message
options: add Unsafe.AllowMissingWALDir option

This unsafe option allows opening a store after moving or losing the
previous WAL dir. This is understood to be risky and have associated
data loss if any of the necessary WALs are not in the new directory.

Fixes #5421

v2.1.0

Toggle v2.1.0's commit message
pebble-release-2.1: change path to v2

v2.0.7

Toggle v2.0.7's commit message
manifest: change panic to Fatalf

This panic causes an "unlock of unlocked mutex" panic on unwinding,
which obscures the original panic. Change to a `Fatalf`.

Fixes #5225