Skip to content

Commit 39153bb

Browse files
committed
go.mod: bump Pebble to 837c19b81bab
Changes: * [`837c19b8`](cockroachdb/pebble@837c19b8) db: fix double Close of directory lock during failed Open * [`b35ff004`](cockroachdb/pebble@b35ff004) db: re-export base.LockDirectory, base.DirLock * [`7d7e2f4b`](cockroachdb/pebble@7d7e2f4b) sstable: set up proper iterator transforms during EstimateDiskUsage * [`20b0451b`](cockroachdb/pebble@20b0451b) db: validate sstable's blob value liveness during DebugCheckLevels * [`ba961483`](cockroachdb/pebble@ba961483) pebble: fix wal recovery dir lock acquisition in Open * [`6feecba1`](cockroachdb/pebble@6feecba1) pebble: add blob rewrite compaction count to metrics string * [`42327e92`](cockroachdb/pebble@42327e92) fix: avoid reducing the last op in reduction process * [`33e6fedc`](cockroachdb/pebble@33e6fedc) fix: use the correct key format in reduction * [`4de9b7c5`](cockroachdb/pebble@4de9b7c5) db: reformat Metrics.String * [`0ef4b16e`](cockroachdb/pebble@0ef4b16e) sstable: add separated value retrieval internal iterator stats * [`dd0f8384`](cockroachdb/pebble@dd0f8384) pebble: lock wal directories on Open * [`c8cfc93a`](cockroachdb/pebble@c8cfc93a) db: use internal iterator stats to populate compaction bytes read * [`1dd9cda1`](cockroachdb/pebble@1dd9cda1) db: maintain per-block kind internal iterator stats * [`41687897`](cockroachdb/pebble@41687897) compression: deflake TestAdaptiveCompressorCompressible Release note: none. Epic: none.
1 parent 97b5668 commit 39153bb

File tree

10 files changed

+21
-18
lines changed

10 files changed

+21
-18
lines changed

DEPS.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,10 +1835,10 @@ def go_deps():
18351835
patches = [
18361836
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
18371837
],
1838-
sha256 = "d3a727e03593def35072caac3e097b4cbc58ebafc3f8dc7294f9acfb7c4d79c0",
1839-
strip_prefix = "github.com/cockroachdb/[email protected]20250708172732-a370be5e7e50",
1838+
sha256 = "b854ba6802c929910b6c5c2572bf9b8b408e1d4cb80db9c62af8fc19fc74dd14",
1839+
strip_prefix = "github.com/cockroachdb/[email protected]20250711175034-837c19b81bab",
18401840
urls = [
1841-
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250708172732-a370be5e7e50.zip",
1841+
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250711175034-837c19b81bab.zip",
18421842
],
18431843
)
18441844
go_repository(

build/bazelutil/distdir_files.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ DISTDIR_FILES = {
358358
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
359359
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20241215232642-bb51bb14a506.zip": "920068af09e3846d9ebb4e4a7787ff1dd10f3989c5f940ad861b0f6a9f824f6e",
360360
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/metamorphic/com_github_cockroachdb_metamorphic-v0.0.0-20231108215700-4ba948b56895.zip": "28c8cf42192951b69378cf537be5a9a43f2aeb35542908cc4fe5f689505853ea",
361-
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250708172732-a370be5e7e50.zip": "d3a727e03593def35072caac3e097b4cbc58ebafc3f8dc7294f9acfb7c4d79c0",
361+
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250711175034-837c19b81bab.zip": "b854ba6802c929910b6c5c2572bf9b8b408e1d4cb80db9c62af8fc19fc74dd14",
362362
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.6.zip": "018eccb5fb9ca52d43ec9eaf213539d01c1f2b94e0e822406ebfb2e9321ef6cf",
363363
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
364364
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/stress/com_github_cockroachdb_stress-v0.0.0-20220803192808-1806698b1b7b.zip": "3fda531795c600daf25532a4f98be2a1335cd1e5e182c72789bca79f5f69fcc1",

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ require (
140140
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
141141
github.com/cockroachdb/gostdlib v1.19.0
142142
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506
143-
github.com/cockroachdb/pebble v0.0.0-20250708172732-a370be5e7e50
143+
github.com/cockroachdb/pebble v0.0.0-20250711175034-837c19b81bab
144144
github.com/cockroachdb/redact v1.1.6
145145
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
146146
github.com/cockroachdb/stress v0.0.0-20220803192808-1806698b1b7b

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 h1:ASDL+UJcILM
582582
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506/go.mod h1:Mw7HqKr2kdtu6aYGn3tPmAftiP3QPX63LdK/zcariIo=
583583
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA=
584584
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA=
585-
github.com/cockroachdb/pebble v0.0.0-20250708172732-a370be5e7e50 h1:nURMd/syIIPsnG2yFt0rx4kUFmjSuCIuGys74/YQxEY=
586-
github.com/cockroachdb/pebble v0.0.0-20250708172732-a370be5e7e50/go.mod h1:LLa+I2vZrOsrsy4QcuZ6wSXBNQll7erNg3GCr8NpE90=
585+
github.com/cockroachdb/pebble v0.0.0-20250711175034-837c19b81bab h1:TL4dKn78L2rqTb2bOMnLJjYoyx7NQUOyi/BD0UDYAjo=
586+
github.com/cockroachdb/pebble v0.0.0-20250711175034-837c19b81bab/go.mod h1:LLa+I2vZrOsrsy4QcuZ6wSXBNQll7erNg3GCr8NpE90=
587587
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
588588
github.com/cockroachdb/redact v1.1.6 h1:zXJBwDZ84xJNlHl1rMyCojqyIxv+7YUpQiJLQ7n4314=
589589
github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=

pkg/cli/interactive_tests/test_encryption.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ end_test
5353

5454
start_test "Run pebble debug tool."
5555
send "$argv debug pebble db lsm $storedir\r"
56-
eexpect "level | tables size val-bl vtables | score ff cff | in | tables size | tables size | tables size | read | r w | refsz valblk\r"
56+
eexpect "LSM"
5757
end_test
5858

5959
start_test "Restart with plaintext."
@@ -107,7 +107,7 @@ end_test
107107

108108
start_test "Run pebble debug tool with AES-256."
109109
send "$argv debug pebble db lsm $storedir --enterprise-encryption=path=$storedir,key=$keydir/aes-256.key,old-key=$keydir/aes-256.key\r"
110-
eexpect "level | tables size val-bl vtables | score ff cff | in | tables size | tables size | tables size | read | r w | refsz valblk\r"
110+
eexpect "LSM"
111111
# Try running without the encryption flag.
112112
send "$argv debug pebble db lsm $storedir\r"
113113
eexpect "If this is an encrypted store, make sure the correct encryption key is set."

pkg/storage/engine.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ func (m *Metrics) IngestedBytes() uint64 {
13481348
// compactions across all levels of the LSM.
13491349
func (m *Metrics) CompactedBytes() (read, written uint64) {
13501350
for _, lm := range m.Metrics.Levels {
1351-
read += lm.TableBytesRead + lm.BlobBytesReadEstimate
1351+
read += lm.TableBytesRead + lm.BlobBytesRead
13521352
written += lm.TableBytesCompacted + lm.BlobBytesCompacted
13531353
}
13541354
return read, written
@@ -1404,7 +1404,7 @@ func (m *Metrics) AsStoreStatsEvent() eventpb.StoreStats {
14041404
BytesIn: l.TableBytesIn,
14051405
BytesIngested: l.TableBytesIngested,
14061406
BytesMoved: l.TableBytesMoved,
1407-
BytesRead: l.TableBytesRead + l.BlobBytesReadEstimate,
1407+
BytesRead: l.TableBytesRead + l.BlobBytesRead,
14081408
BytesCompacted: l.TableBytesCompacted + l.BlobBytesCompacted,
14091409
BytesFlushed: l.TableBytesFlushed + l.BlobBytesFlushed,
14101410
TablesCompacted: l.TablesCompacted,

pkg/storage/fs/fs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ type Env struct {
228228
UnencryptedFS vfs.FS
229229
// DirectoryLock is a file lock preventing other processes from opening the
230230
// database or encryption-at-rest registry within this data directory.
231-
DirectoryLock *pebble.Lock
231+
DirectoryLock *pebble.DirLock
232232
// Registry is non-nil if encryption-at-rest has ever been enabled on the
233233
// store. The registry maintains a mapping of all encrypted keys and the
234234
// corresponding data key with which they're encrypted.

pkg/storage/mvcc.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4397,8 +4397,9 @@ func recordIteratorStats(iter iteratorWithStats, scanStats *kvpb.ScanStats) {
43974397
scanStats.NumInternalSeeks += uint64(internalSeeks)
43984398
scanStats.NumInterfaceSteps += uint64(steps)
43994399
scanStats.NumInternalSteps += uint64(internalSteps)
4400-
scanStats.BlockBytes += stats.InternalStats.BlockBytes
4401-
scanStats.BlockBytesInCache += stats.InternalStats.BlockBytesInCache
4400+
blockReads := stats.InternalStats.TotalBlockReads()
4401+
scanStats.BlockBytes += blockReads.BlockBytes
4402+
scanStats.BlockBytesInCache += blockReads.BlockBytesInCache
44024403
scanStats.KeyBytes += stats.InternalStats.KeyBytes
44034404
scanStats.ValueBytes += stats.InternalStats.ValueBytes
44044405
scanStats.PointCount += stats.InternalStats.PointCount
@@ -4409,7 +4410,7 @@ func recordIteratorStats(iter iteratorWithStats, scanStats *kvpb.ScanStats) {
44094410
scanStats.SeparatedPointCount += stats.InternalStats.SeparatedPointValue.Count
44104411
scanStats.SeparatedPointValueBytes += stats.InternalStats.SeparatedPointValue.ValueBytes
44114412
scanStats.SeparatedPointValueBytesFetched += stats.InternalStats.SeparatedPointValue.ValueBytesFetched
4412-
scanStats.BlockReadDuration += stats.InternalStats.BlockReadDuration
4413+
scanStats.BlockReadDuration += blockReads.BlockReadDuration
44134414
}
44144415

44154416
// mvccScanInit performs some preliminary checks on the validity of options for

pkg/storage/open.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ func makeExternalWALDir(
292292
}
293293
engineCfg.afterClose = append(engineCfg.afterClose, env.Close)
294294
return wal.Dir{
295+
Lock: env.DirectoryLock,
295296
FS: env,
296297
Dirname: externalDir.Path,
297298
}, nil

pkg/storage/pebble.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,11 +1414,12 @@ func (p *Pebble) Close() {
14141414
// iterator stats when an iterator is closed or its stats are reset. These
14151415
// aggregated stats are exposed through GetMetrics.
14161416
func (p *Pebble) aggregateIterStats(stats IteratorStats) {
1417+
blockReads := stats.Stats.InternalStats.TotalBlockReads()
14171418
p.iterStats.Lock()
14181419
defer p.iterStats.Unlock()
1419-
p.iterStats.BlockBytes += stats.Stats.InternalStats.BlockBytes
1420-
p.iterStats.BlockBytesInCache += stats.Stats.InternalStats.BlockBytesInCache
1421-
p.iterStats.BlockReadDuration += stats.Stats.InternalStats.BlockReadDuration
1420+
p.iterStats.BlockBytes += blockReads.BlockBytes
1421+
p.iterStats.BlockBytesInCache += blockReads.BlockBytesInCache
1422+
p.iterStats.BlockReadDuration += blockReads.BlockReadDuration
14221423
p.iterStats.ExternalSeeks += stats.Stats.ForwardSeekCount[pebble.InterfaceCall] + stats.Stats.ReverseSeekCount[pebble.InterfaceCall]
14231424
p.iterStats.ExternalSteps += stats.Stats.ForwardStepCount[pebble.InterfaceCall] + stats.Stats.ReverseStepCount[pebble.InterfaceCall]
14241425
p.iterStats.InternalSeeks += stats.Stats.ForwardSeekCount[pebble.InternalIterCall] + stats.Stats.ReverseSeekCount[pebble.InternalIterCall]

0 commit comments

Comments
 (0)