diff --git a/go.mod b/go.mod index 45bc605dbd..fe4942613a 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 github.com/golang/snappy v0.0.4 github.com/guptarohit/asciigraph v0.5.5 - github.com/klauspost/compress v1.16.7 + github.com/klauspost/compress v1.17.9 github.com/kr/pretty v0.3.1 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.0 diff --git a/go.sum b/go.sum index 7e76bb7e48..ba4525dc64 100644 --- a/go.sum +++ b/go.sum @@ -229,8 +229,8 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= diff --git a/replay/testdata/corpus/simple b/replay/testdata/corpus/simple index 28d6a51dd8..6385f88b1d 100644 --- a/replay/testdata/corpus/simple +++ b/replay/testdata/corpus/simple @@ -82,4 +82,4 @@ simple/MANIFEST-000001: simple/MANIFEST-000008: size: 122 simple/000007.sst: - size: 614 + size: 625 diff --git a/replay/testdata/replay b/replay/testdata/replay index 89fdda344f..0b358e319e 100644 --- a/replay/testdata/replay +++ b/replay/testdata/replay @@ -8,7 +8,7 @@ tree 89 000004.log 586 000005.sst 49 000006.log - 614 000007.sst + 625 000007.sst 0 LOCK 98 MANIFEST-000001 122 MANIFEST-000008 @@ -16,7 +16,7 @@ tree 0 marker.format-version.000001.013 0 marker.manifest.000002.MANIFEST-000008 simple/ - 614 000007.sst + 625 000007.sst 98 MANIFEST-000001 122 MANIFEST-000008 checkpoint/ diff --git a/replay/testdata/replay_paced b/replay/testdata/replay_paced index 15a95de63f..e4519cd325 100644 --- a/replay/testdata/replay_paced +++ b/replay/testdata/replay_paced @@ -5,12 +5,12 @@ tree ---- / build/ - 864 000005.sst + 911 000005.sst 560 000007.sst 89 000009.log 560 000010.sst 200 000012.log - 614 000013.sst + 625 000013.sst 0 LOCK 122 MANIFEST-000008 205 MANIFEST-000011 @@ -18,10 +18,10 @@ tree 0 marker.format-version.000001.013 0 marker.manifest.000003.MANIFEST-000011 high_read_amp/ - 614 000013.sst + 625 000013.sst 205 MANIFEST-000011 checkpoint/ - 864 000005.sst + 911 000005.sst 560 000007.sst 39 000009.log 560 000010.sst diff --git a/sstable/compression.go b/sstable/compression.go index 70f4c6033d..b9e1ba95e2 100644 --- a/sstable/compression.go +++ b/sstable/compression.go @@ -10,7 +10,7 @@ import ( "github.com/cockroachdb/errors" "github.com/cockroachdb/pebble/internal/base" "github.com/cockroachdb/pebble/internal/cache" - "github.com/golang/snappy" + "github.com/klauspost/compress/snappy" ) func decompressedLen(blockType blockType, b []byte) (int, int, error) { diff --git a/sstable/properties_test.go b/sstable/properties_test.go index f50c7f9fb7..1c51dd4faf 100644 --- a/sstable/properties_test.go +++ b/sstable/properties_test.go @@ -30,7 +30,7 @@ func TestPropertiesLoad(t *testing.T) { CompressionOptions: "window_bits=-14; level=32767; strategy=0; max_dict_bytes=0; zstd_max_train_bytes=0; enabled=0; ", }, ComparerName: "leveldb.BytewiseComparator", - DataSize: 13913, + DataSize: 13712, IndexSize: 325, MergerName: "nullptr", NumDataBlocks: 14, diff --git a/sstable/testdata/h.sst b/sstable/testdata/h.sst index cf69f2a6e2..73c6f5c46b 100644 Binary files a/sstable/testdata/h.sst and b/sstable/testdata/h.sst differ diff --git a/sstable/testdata/h.table-bloom.sst b/sstable/testdata/h.table-bloom.sst index 5c25dc00a0..37d1ee1846 100644 Binary files a/sstable/testdata/h.table-bloom.sst and b/sstable/testdata/h.table-bloom.sst differ diff --git a/sstable/testdata/readerstats_Pebblev3/iter b/sstable/testdata/readerstats_Pebblev3/iter index b20a4b212b..c665f96c00 100644 --- a/sstable/testdata/readerstats_Pebblev3/iter +++ b/sstable/testdata/readerstats_Pebblev3/iter @@ -19,7 +19,7 @@ e@27.SET.37:eAT27 e@26.SET.36:eAT26 ---- index entries: - f: size 228 + f: size 226 # Iterating across older versions and fetching the older version values. iter @@ -33,13 +33,13 @@ next stats ---- -{BlockBytes:251 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:0 ValueBytes:0 ValueBytesFetched:0}} +{BlockBytes:249 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:0 ValueBytes:0 ValueBytesFetched:0}} -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:1 ValueBytes:4 ValueBytesFetched:4}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:1 ValueBytes:4 ValueBytesFetched:4}} -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:2 ValueBytes:8 ValueBytesFetched:8}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:2 ValueBytes:8 ValueBytesFetched:8}} -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:2 ValueBytes:8 ValueBytesFetched:8}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:2 ValueBytes:8 ValueBytesFetched:8}} # seek-ge e@37 starts at the restart point at the beginning of the block and # iterates over 3 irrelevant separated versions before getting to e@37 @@ -55,12 +55,12 @@ next stats ---- -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:4 ValueBytes:18 ValueBytesFetched:5}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:4 ValueBytes:18 ValueBytesFetched:5}} -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:8 ValueBytes:38 ValueBytesFetched:25}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:8 ValueBytes:38 ValueBytesFetched:25}} # seek-ge e@26 lands at the restart point e@26. iter @@ -72,8 +72,8 @@ prev stats ---- -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:1 ValueBytes:5 ValueBytesFetched:5}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:1 ValueBytes:5 ValueBytesFetched:5}} -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:2 ValueBytes:10 ValueBytesFetched:10}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:2 ValueBytes:10 ValueBytesFetched:10}} -{BlockBytes:328 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:3 ValueBytes:15 ValueBytesFetched:15}} +{BlockBytes:316 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:3 ValueBytes:15 ValueBytesFetched:15}} diff --git a/sstable/testdata/writer_v3 b/sstable/testdata/writer_v3 index a260dddbc3..419c3f319a 100644 --- a/sstable/testdata/writer_v3 +++ b/sstable/testdata/writer_v3 @@ -288,11 +288,11 @@ layout 81 index (22) 108 index (22) 135 index (22) - 162 top-index (51) - 218 properties (453) - 676 meta-index (33) - 714 footer (53) - 767 EOF + 162 top-index (50) + 217 properties (453) + 675 meta-index (33) + 713 footer (53) + 766 EOF scan ---- diff --git a/sstable/testdata/writer_value_blocks b/sstable/testdata/writer_value_blocks index 17a6dc057c..9460e72ad7 100644 --- a/sstable/testdata/writer_value_blocks +++ b/sstable/testdata/writer_value_blocks @@ -189,7 +189,7 @@ layout 350 [restart 288] 354 [restart 308] 358 [restart 331] - 352 [trailer compression=snappy checksum=0x8bd0d63a] + 352 [trailer compression=snappy checksum=0xc5f9e812] 357 value-block (11) 373 value-block (15) 393 value-index (8) @@ -296,7 +296,7 @@ c@5#6,DEL: layout ---- - 0 data (66) + 0 data (56) 0 record (17 = 3 [0] + 11 + 3) [restart] b@5#7,SET:b5 17 record (14 = 3 [1] + 10 + 1) @@ -306,41 +306,41 @@ layout 45 record (13 = 3 [1] + 10 + 0) c@5#6,DEL: 58 [restart 0] - 66 [trailer compression=none checksum=0x4e91250f] - 71 index (22) - 71 block:0/66 [restart] - 85 [restart 71] - 93 [trailer compression=none checksum=0xf80f5bcf] - 98 properties (479) - 98 obsolete-key (16) [restart] - 114 pebble.raw.point-tombstone.key.size (39) - 153 rocksdb.block.based.table.index.type (43) - 196 rocksdb.comparator (37) - 233 rocksdb.compression (16) - 249 rocksdb.compression_options (106) - 355 rocksdb.data.size (13) - 368 rocksdb.deleted.keys (15) - 383 rocksdb.filter.size (15) - 398 rocksdb.index.size (14) - 412 rocksdb.merge.operands (18) - 430 rocksdb.merge.operator (24) - 454 rocksdb.num.data.blocks (19) - 473 rocksdb.num.entries (11) - 484 rocksdb.num.range-deletions (19) - 503 rocksdb.property.collectors (36) - 539 rocksdb.raw.key.size (16) - 555 rocksdb.raw.value.size (14) - 569 [restart 98] - 577 [trailer compression=none checksum=0xdd2d145f] - 582 meta-index (32) - 582 rocksdb.properties block:98/479 [restart] - 606 [restart 582] - 614 [trailer compression=none checksum=0xbfc95718] - 619 footer (53) - 619 checksum type: crc32c - 620 meta: offset=582, length=32 - 623 index: offset=71, length=22 - 625 [padding] - 660 version: 4 - 664 magic number: 0xf09faab3f09faab3 - 672 EOF + 56 [trailer compression=snappy checksum=0xb816bb83] + 61 index (22) + 61 block:0/56 [restart] + 75 [restart 61] + 83 [trailer compression=none checksum=0x94eb7290] + 88 properties (479) + 88 obsolete-key (16) [restart] + 104 pebble.raw.point-tombstone.key.size (39) + 143 rocksdb.block.based.table.index.type (43) + 186 rocksdb.comparator (37) + 223 rocksdb.compression (16) + 239 rocksdb.compression_options (106) + 345 rocksdb.data.size (13) + 358 rocksdb.deleted.keys (15) + 373 rocksdb.filter.size (15) + 388 rocksdb.index.size (14) + 402 rocksdb.merge.operands (18) + 420 rocksdb.merge.operator (24) + 444 rocksdb.num.data.blocks (19) + 463 rocksdb.num.entries (11) + 474 rocksdb.num.range-deletions (19) + 493 rocksdb.property.collectors (36) + 529 rocksdb.raw.key.size (16) + 545 rocksdb.raw.value.size (14) + 559 [restart 88] + 567 [trailer compression=none checksum=0x19159187] + 572 meta-index (32) + 572 rocksdb.properties block:88/479 [restart] + 596 [restart 572] + 604 [trailer compression=none checksum=0xd592ce8e] + 609 footer (53) + 609 checksum type: crc32c + 610 meta: offset=572, length=32 + 613 index: offset=61, length=22 + 615 [padding] + 650 version: 4 + 654 magic number: 0xf09faab3f09faab3 + 662 EOF diff --git a/testdata/checkpoint b/testdata/checkpoint index b9ae37c21e..1f05e2e4e2 100644 --- a/testdata/checkpoint +++ b/testdata/checkpoint @@ -211,28 +211,28 @@ close: db/000009.sst sync: db sync: db/MANIFEST-000001 open: db/000005.sst (options: *vfs.randomReadsOption) -read-at(558, 53): db/000005.sst -read-at(521, 37): db/000005.sst -read-at(74, 447): db/000005.sst +read-at(557, 53): db/000005.sst +read-at(520, 37): db/000005.sst +read-at(73, 447): db/000005.sst open: db/000009.sst (options: *vfs.randomReadsOption) -read-at(553, 53): db/000009.sst -read-at(516, 37): db/000009.sst -read-at(69, 447): db/000009.sst +read-at(548, 53): db/000009.sst +read-at(511, 37): db/000009.sst +read-at(64, 447): db/000009.sst open: db/000007.sst (options: *vfs.randomReadsOption) -read-at(558, 53): db/000007.sst -read-at(521, 37): db/000007.sst -read-at(74, 447): db/000007.sst -read-at(47, 27): db/000005.sst +read-at(557, 53): db/000007.sst +read-at(520, 37): db/000007.sst +read-at(73, 447): db/000007.sst +read-at(46, 27): db/000005.sst open: db/000005.sst (options: *vfs.sequentialReadsOption) -read-at(0, 47): db/000005.sst -read-at(47, 27): db/000007.sst +read-at(0, 46): db/000005.sst +read-at(46, 27): db/000007.sst open: db/000007.sst (options: *vfs.sequentialReadsOption) -read-at(0, 47): db/000007.sst +read-at(0, 46): db/000007.sst create: db/000010.sst close: db/000005.sst -read-at(42, 27): db/000009.sst +read-at(37, 27): db/000009.sst open: db/000009.sst (options: *vfs.sequentialReadsOption) -read-at(0, 42): db/000009.sst +read-at(0, 37): db/000009.sst close: db/000007.sst close: db/000009.sst sync-data: db/000010.sst @@ -291,17 +291,17 @@ close: checkpoints/checkpoint1/000006.log scan checkpoints/checkpoint1 ---- open: checkpoints/checkpoint1/000007.sst (options: *vfs.randomReadsOption) -read-at(558, 53): checkpoints/checkpoint1/000007.sst -read-at(521, 37): checkpoints/checkpoint1/000007.sst -read-at(74, 447): checkpoints/checkpoint1/000007.sst -read-at(47, 27): checkpoints/checkpoint1/000007.sst -read-at(0, 47): checkpoints/checkpoint1/000007.sst +read-at(557, 53): checkpoints/checkpoint1/000007.sst +read-at(520, 37): checkpoints/checkpoint1/000007.sst +read-at(73, 447): checkpoints/checkpoint1/000007.sst +read-at(46, 27): checkpoints/checkpoint1/000007.sst +read-at(0, 46): checkpoints/checkpoint1/000007.sst open: checkpoints/checkpoint1/000005.sst (options: *vfs.randomReadsOption) -read-at(558, 53): checkpoints/checkpoint1/000005.sst -read-at(521, 37): checkpoints/checkpoint1/000005.sst -read-at(74, 447): checkpoints/checkpoint1/000005.sst -read-at(47, 27): checkpoints/checkpoint1/000005.sst -read-at(0, 47): checkpoints/checkpoint1/000005.sst +read-at(557, 53): checkpoints/checkpoint1/000005.sst +read-at(520, 37): checkpoints/checkpoint1/000005.sst +read-at(73, 447): checkpoints/checkpoint1/000005.sst +read-at(46, 27): checkpoints/checkpoint1/000005.sst +read-at(0, 46): checkpoints/checkpoint1/000005.sst a 1 b 5 c 3 @@ -358,11 +358,11 @@ close: checkpoints/checkpoint2/000006.log scan checkpoints/checkpoint2 ---- open: checkpoints/checkpoint2/000007.sst (options: *vfs.randomReadsOption) -read-at(558, 53): checkpoints/checkpoint2/000007.sst -read-at(521, 37): checkpoints/checkpoint2/000007.sst -read-at(74, 447): checkpoints/checkpoint2/000007.sst -read-at(47, 27): checkpoints/checkpoint2/000007.sst -read-at(0, 47): checkpoints/checkpoint2/000007.sst +read-at(557, 53): checkpoints/checkpoint2/000007.sst +read-at(520, 37): checkpoints/checkpoint2/000007.sst +read-at(73, 447): checkpoints/checkpoint2/000007.sst +read-at(46, 27): checkpoints/checkpoint2/000007.sst +read-at(0, 46): checkpoints/checkpoint2/000007.sst b 5 d 7 e 8 @@ -400,17 +400,17 @@ close: checkpoints/checkpoint3/000006.log scan checkpoints/checkpoint3 ---- open: checkpoints/checkpoint3/000007.sst (options: *vfs.randomReadsOption) -read-at(558, 53): checkpoints/checkpoint3/000007.sst -read-at(521, 37): checkpoints/checkpoint3/000007.sst -read-at(74, 447): checkpoints/checkpoint3/000007.sst -read-at(47, 27): checkpoints/checkpoint3/000007.sst -read-at(0, 47): checkpoints/checkpoint3/000007.sst +read-at(557, 53): checkpoints/checkpoint3/000007.sst +read-at(520, 37): checkpoints/checkpoint3/000007.sst +read-at(73, 447): checkpoints/checkpoint3/000007.sst +read-at(46, 27): checkpoints/checkpoint3/000007.sst +read-at(0, 46): checkpoints/checkpoint3/000007.sst open: checkpoints/checkpoint3/000005.sst (options: *vfs.randomReadsOption) -read-at(558, 53): checkpoints/checkpoint3/000005.sst -read-at(521, 37): checkpoints/checkpoint3/000005.sst -read-at(74, 447): checkpoints/checkpoint3/000005.sst -read-at(47, 27): checkpoints/checkpoint3/000005.sst -read-at(0, 47): checkpoints/checkpoint3/000005.sst +read-at(557, 53): checkpoints/checkpoint3/000005.sst +read-at(520, 37): checkpoints/checkpoint3/000005.sst +read-at(73, 447): checkpoints/checkpoint3/000005.sst +read-at(46, 27): checkpoints/checkpoint3/000005.sst +read-at(0, 46): checkpoints/checkpoint3/000005.sst a 1 b 5 c 3 @@ -550,11 +550,11 @@ e 8 f 9 g 10 open: checkpoints/checkpoint4/000011.sst (options: *vfs.randomReadsOption) -read-at(526, 53): checkpoints/checkpoint4/000011.sst -read-at(489, 37): checkpoints/checkpoint4/000011.sst -read-at(70, 419): checkpoints/checkpoint4/000011.sst -read-at(43, 27): checkpoints/checkpoint4/000011.sst -read-at(0, 43): checkpoints/checkpoint4/000011.sst +read-at(524, 53): checkpoints/checkpoint4/000011.sst +read-at(487, 37): checkpoints/checkpoint4/000011.sst +read-at(68, 419): checkpoints/checkpoint4/000011.sst +read-at(41, 27): checkpoints/checkpoint4/000011.sst +read-at(0, 41): checkpoints/checkpoint4/000011.sst h 11 i i k k diff --git a/testdata/compaction_delete_only_hints b/testdata/compaction_delete_only_hints index da6221e1d7..fbcfca0b37 100644 --- a/testdata/compaction_delete_only_hints +++ b/testdata/compaction_delete_only_hints @@ -88,7 +88,7 @@ maybe-compact Deletion hints: (none) Compactions: - [JOB 100] compacted(delete-only) L2 [000005] (605B) Score=0.00 + L3 [000006] (605B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s + [JOB 100] compacted(delete-only) L2 [000005] (600B) Score=0.00 + L3 [000006] (600B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s # Verify that compaction correctly handles the presence of multiple # overlapping hints which might delete a file multiple times. All of the @@ -127,7 +127,7 @@ maybe-compact Deletion hints: (none) Compactions: - [JOB 100] compacted(delete-only) L2 [000006] (605B) Score=0.00 + L3 [000007] (605B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s + [JOB 100] compacted(delete-only) L2 [000006] (600B) Score=0.00 + L3 [000007] (600B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s # Test a range tombstone that is already compacted into L6. @@ -206,7 +206,7 @@ maybe-compact Deletion hints: (none) Compactions: - [JOB 100] compacted(delete-only) L2 [000005] (605B) Score=0.00 + L3 [000006] (605B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s + [JOB 100] compacted(delete-only) L2 [000005] (600B) Score=0.00 + L3 [000006] (600B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s # A deletion hint present on an sstable in a higher level should NOT result in a # deletion-only compaction incorrectly removing an sstable in L6 following an diff --git a/testdata/compaction_picker_scores b/testdata/compaction_picker_scores index a1cf2afd8e..8824d08221 100644 --- a/testdata/compaction_picker_scores +++ b/testdata/compaction_picker_scores @@ -145,7 +145,7 @@ wait-pending-table-stats num-entries: 5 num-deletions: 5 num-range-key-sets: 0 -point-deletions-bytes-estimate: 164517 +point-deletions-bytes-estimate: 164518 range-deletions-bytes-estimate: 0 maybe-compact diff --git a/testdata/compaction_tombstones b/testdata/compaction_tombstones index 7192cea6f2..fc23833e82 100644 --- a/testdata/compaction_tombstones +++ b/testdata/compaction_tombstones @@ -80,12 +80,12 @@ wait-pending-table-stats num-entries: 2 num-deletions: 1 num-range-key-sets: 0 -point-deletions-bytes-estimate: 84 +point-deletions-bytes-estimate: 83 range-deletions-bytes-estimate: 0 maybe-compact ---- -[JOB 100] compacted(elision-only) L6 [000004] (642B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (591B), in 1.0s (2.0s total), output rate 591B/s +[JOB 100] compacted(elision-only) L6 [000004] (637B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (591B), in 1.0s (2.0s total), output rate 591B/s version ---- @@ -120,7 +120,7 @@ num-entries: 6 num-deletions: 2 num-range-key-sets: 0 point-deletions-bytes-estimate: 39 -range-deletions-bytes-estimate: 66 +range-deletions-bytes-estimate: 63 maybe-compact ---- @@ -134,7 +134,7 @@ close-snapshot close-snapshot 103 ---- -[JOB 100] compacted(elision-only) L6 [000004] (820B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s +[JOB 100] compacted(elision-only) L6 [000004] (817B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s # Test a table that contains both deletions and non-deletions, but whose # non-deletions well outnumber its deletions. The table should not be @@ -208,7 +208,7 @@ range-deletions-bytes-estimate: 16492 maybe-compact ---- -[JOB 100] compacted(default) L5 [000004 000005] (25KB) Score=87.23 + L6 [000007] (17KB) Score=0.73 -> L6 [000009] (25KB), in 1.0s (2.0s total), output rate 25KB/s +[JOB 100] compacted(default) L5 [000004 000005] (25KB) Score=87.22 + L6 [000007] (17KB) Score=0.73 -> L6 [000009] (25KB), in 1.0s (2.0s total), output rate 25KB/s define level-max-bytes=(L5 : 1000) auto-compactions=off L5 @@ -233,7 +233,7 @@ wait-pending-table-stats num-entries: 3 num-deletions: 3 num-range-key-sets: 0 -point-deletions-bytes-estimate: 6786 +point-deletions-bytes-estimate: 6781 range-deletions-bytes-estimate: 0 # By plain file size, 000005 should be picked because it is larger and @@ -243,7 +243,7 @@ range-deletions-bytes-estimate: 0 maybe-compact ---- -[JOB 100] compacted(default) L5 [000004] (652B) Score=13.17 + L6 [000006] (13KB) Score=0.92 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s +[JOB 100] compacted(default) L5 [000004] (641B) Score=13.14 + L6 [000006] (13KB) Score=0.92 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s # A table containing only range keys is not eligible for elision. # RANGEKEYDEL or RANGEKEYUNSET. @@ -319,11 +319,11 @@ num-entries: 3 num-deletions: 1 num-range-key-sets: 0 point-deletions-bytes-estimate: 0 -range-deletions-bytes-estimate: 41 +range-deletions-bytes-estimate: 36 maybe-compact ---- -[JOB 100] compacted(elision-only) L6 [000004] (822B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (597B), in 1.0s (2.0s total), output rate 597B/s +[JOB 100] compacted(elision-only) L6 [000004] (817B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (597B), in 1.0s (2.0s total), output rate 597B/s # Close the DB, asserting that the reference counts balance. close @@ -373,7 +373,7 @@ range-deletions-bytes-estimate: 8246 maybe-compact ---- -[JOB 100] compacted(default) L5 [000005] (669B) Score=11.60 + L6 [000007] (13KB) Score=1.06 -> L6 [000008] (4.6KB), in 1.0s (2.0s total), output rate 4.6KB/s +[JOB 100] compacted(default) L5 [000005] (669B) Score=11.59 + L6 [000007] (13KB) Score=1.06 -> L6 [000008] (4.6KB), in 1.0s (2.0s total), output rate 4.6KB/s # The same LSM as above. However, this time, with point tombstone weighting at # 2x, the table with the point tombstone (000004) will be selected as the @@ -416,4 +416,4 @@ range-deletions-bytes-estimate: 8246 maybe-compact ---- -[JOB 100] compacted(default) L5 [000005] (669B) Score=11.60 + L6 [000007] (13KB) Score=1.06 -> L6 [000008] (4.6KB), in 1.0s (2.0s total), output rate 4.6KB/s +[JOB 100] compacted(default) L5 [000005] (669B) Score=11.59 + L6 [000007] (13KB) Score=1.06 -> L6 [000008] (4.6KB), in 1.0s (2.0s total), output rate 4.6KB/s diff --git a/testdata/external_iterator b/testdata/external_iterator index 8766499695..5bc7722bc8 100644 --- a/testdata/external_iterator +++ b/testdata/external_iterator @@ -245,4 +245,4 @@ aaaa@3: (aaaa@3, .) aaaa@1: (aaaa@1, .) aaaaa@3: (aaaaa@3, .) aaaaa@1: (aaaaa@1, .) -stats: seeked 5 times (5 internal); stepped 5 times (5 internal); blocks: 0B cached, 547B not cached (read time: 0s); points: 10 (50B keys, 35B values); separated: 15 (65B, 25B fetched) +stats: seeked 5 times (5 internal); stepped 5 times (5 internal); blocks: 0B cached, 511B not cached (read time: 0s); points: 10 (50B keys, 35B values); separated: 15 (65B, 25B fetched) diff --git a/testdata/ingest_external b/testdata/ingest_external index 7cca6fb23a..c70eec0519 100644 --- a/testdata/ingest_external +++ b/testdata/ingest_external @@ -331,7 +331,7 @@ lsm verbose ---- L6: 000004(000004):[gc#10,DELSIZED-gf#inf,RANGEDEL] seqnums:[10-10] points:[gc#10,DELSIZED-gf#inf,RANGEDEL] size:947 - 000005(000005):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:628 + 000005(000005):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:622 download g h via-backing-file-download ---- @@ -341,8 +341,8 @@ ok lsm verbose ---- L6: - 000006(000006):[gc#10,DELSIZED-gf#inf,RANGEDEL] seqnums:[10-10] points:[gc#10,DELSIZED-gf#inf,RANGEDEL] size:710 - 000007(000007):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:612 + 000006(000006):[gc#10,DELSIZED-gf#inf,RANGEDEL] seqnums:[10-10] points:[gc#10,DELSIZED-gf#inf,RANGEDEL] size:709 + 000007(000007):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:606 reopen ---- diff --git a/testdata/iter_histories/errors b/testdata/iter_histories/errors index 16cd5ef2d5..08f5e6379a 100644 --- a/testdata/iter_histories/errors +++ b/testdata/iter_histories/errors @@ -78,12 +78,12 @@ L0.0: layout filename=000004.sst ---- 0 data (38) - 43 index (35) - 83 range-key (29) - 117 properties (573) - 695 meta-index (57) - 757 footer (53) - 810 EOF + 43 index (30) + 78 range-key (29) + 112 properties (573) + 690 meta-index (57) + 752 footer (53) + 805 EOF # Inject an error on the first `ReadAt` call on 000004.sst's range key block # (which is at offset 83). @@ -95,7 +95,7 @@ combined-iter first first ---- -err=injected error +a: (a, .) a: (a, .) # Test a scenario where an error occurs while the top-level Iterator is @@ -127,11 +127,11 @@ layout filename=000004.sst 112 data (22) 139 data (22) 166 data (22) - 193 index (113) - 311 properties (571) - 887 meta-index (33) - 925 footer (53) - 978 EOF + 193 index (121) + 319 properties (571) + 895 meta-index (33) + 933 footer (53) + 986 EOF reopen auto-compactions=off enable-table-stats=false inject-errors=((ErrInjected (And (PathMatch "000004.sst") (OpFileReadAt 0)))) ---- diff --git a/testdata/iter_histories/range_key_masking b/testdata/iter_histories/range_key_masking index 2252c46aa6..2fcd88c418 100644 --- a/testdata/iter_histories/range_key_masking +++ b/testdata/iter_histories/range_key_masking @@ -166,7 +166,7 @@ stats ---- a: (., [a-z) @5=boop UPDATED) . -stats: seeked 1 times (1 internal); stepped 1 times (1 internal); blocks: 514B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) +stats: seeked 1 times (1 internal); stepped 1 times (1 internal); blocks: 539B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) # Perform a similar comparison in reverse. @@ -186,7 +186,7 @@ stats ---- a: (., [a-z) @5=boop UPDATED) . -stats: seeked 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); stepped 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); blocks: 514B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) +stats: seeked 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); stepped 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); blocks: 539B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) # Perform similar comparisons with seeks. @@ -197,7 +197,7 @@ stats ---- m: (., [a-z) @5=boop UPDATED) . -stats: seeked 1 times (1 internal); stepped 1 times (1 internal); blocks: 789B cached; points: 13 (39B keys, 39B values), range keys: 1, contained points: 13 (13 skipped) +stats: seeked 1 times (1 internal); stepped 1 times (1 internal); blocks: 814B cached; points: 13 (39B keys, 39B values), range keys: 1, contained points: 13 (13 skipped) combined-iter mask-suffix=@9 mask-filter seek-ge m @@ -206,7 +206,7 @@ stats ---- m: (., [a-z) @5=boop UPDATED) . -stats: seeked 1 times (1 internal); stepped 1 times (1 internal); blocks: 514B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) +stats: seeked 1 times (1 internal); stepped 1 times (1 internal); blocks: 539B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) combined-iter mask-suffix=@9 seek-lt m @@ -215,7 +215,7 @@ stats ---- a: (., [a-z) @5=boop UPDATED) . -stats: seeked 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); stepped 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); blocks: 789B cached; points: 12 (36B keys, 36B values), range keys: 1, contained points: 12 (12 skipped) +stats: seeked 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); stepped 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); blocks: 814B cached; points: 12 (36B keys, 36B values), range keys: 1, contained points: 12 (12 skipped) combined-iter mask-suffix=@9 mask-filter seek-lt m @@ -224,4 +224,4 @@ stats ---- a: (., [a-z) @5=boop UPDATED) . -stats: seeked 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); stepped 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); blocks: 539B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) +stats: seeked 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); stepped 1 times (0 fwd/1 rev, internal: 0 fwd/1 rev); blocks: 564B cached; points: 2 (6B keys, 6B values), range keys: 1, contained points: 2 (2 skipped) diff --git a/testdata/iterator_stats b/testdata/iterator_stats index 7c7b9347cd..8271b14fa3 100644 --- a/testdata/iterator_stats +++ b/testdata/iterator_stats @@ -17,7 +17,7 @@ stats a: (1, .) c: (2, .) . -stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 57B cached; points: 2 (2B keys, 2B values) +stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 52B cached; points: 2 (2B keys, 2B values) # Perform the same operation again with a new iterator. It should yield # identical statistics. @@ -31,7 +31,7 @@ stats a: (1, .) c: (2, .) . -stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 57B cached; points: 2 (2B keys, 2B values) +stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 52B cached; points: 2 (2B keys, 2B values) build ext2 set d@10 d10 @@ -61,13 +61,13 @@ next stats ---- c: (2, .) -stats: seeked 1 times (1 internal); stepped 0 times (0 internal); blocks: 57B cached; points: 1 (1B keys, 1B values) +stats: seeked 1 times (1 internal); stepped 0 times (0 internal); blocks: 52B cached; points: 1 (1B keys, 1B values) d@10: (d10, .) d@9: (d9, .) -stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 147B cached, 10B not cached (read time: 0s); points: 3 (8B keys, 6B values); separated: 1 (2B, 2B fetched) +stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 142B cached, 10B not cached (read time: 0s); points: 3 (8B keys, 6B values); separated: 1 (2B, 2B fetched) d@8: (d8, .) -stats: seeked 1 times (1 internal); stepped 3 times (3 internal); blocks: 147B cached, 10B not cached (read time: 0s); points: 4 (11B keys, 8B values); separated: 2 (4B, 4B fetched) +stats: seeked 1 times (1 internal); stepped 3 times (3 internal); blocks: 142B cached, 10B not cached (read time: 0s); points: 4 (11B keys, 8B values); separated: 2 (4B, 4B fetched) e@20: (e20, .) -stats: seeked 1 times (1 internal); stepped 4 times (4 internal); blocks: 147B cached, 10B not cached (read time: 0s); points: 5 (15B keys, 11B values); separated: 2 (4B, 4B fetched) +stats: seeked 1 times (1 internal); stepped 4 times (4 internal); blocks: 142B cached, 10B not cached (read time: 0s); points: 5 (15B keys, 11B values); separated: 2 (4B, 4B fetched) e@18: (e18, .) -stats: seeked 1 times (1 internal); stepped 5 times (5 internal); blocks: 147B cached, 10B not cached (read time: 0s); points: 6 (19B keys, 13B values); separated: 3 (7B, 7B fetched) +stats: seeked 1 times (1 internal); stepped 5 times (5 internal); blocks: 142B cached, 10B not cached (read time: 0s); points: 6 (19B keys, 13B values); separated: 3 (7B, 7B fetched) diff --git a/testdata/merging_iter b/testdata/merging_iter index d4d32306d7..72ec646506 100644 --- a/testdata/merging_iter +++ b/testdata/merging_iter @@ -636,7 +636,7 @@ next stats ---- a#30,SET:30 -{BlockBytes:97 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:1 ValueBytes:2 PointCount:1 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:0 ValueBytes:0 ValueBytesFetched:0}} +{BlockBytes:99 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:1 ValueBytes:2 PointCount:1 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:0 ValueBytes:0 ValueBytesFetched:0}} {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:0 ValueBytes:0 PointCount:0 PointsCoveredByRangeTombstones:0 SeparatedPointValue:{Count:0 ValueBytes:0 ValueBytesFetched:0}} f#21,SET:21 {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s KeyBytes:5 ValueBytes:10 PointCount:5 PointsCoveredByRangeTombstones:4 SeparatedPointValue:{Count:0 ValueBytes:0 ValueBytesFetched:0}} diff --git a/testdata/metrics b/testdata/metrics index ebd7787aaa..a22223e347 100644 --- a/testdata/metrics +++ b/testdata/metrics @@ -344,7 +344,7 @@ additional-metrics ---- block bytes written: __level___data-block__value-block - 0 198B 38B + 0 202B 38B 1 0B 0B 2 0B 0B 3 0B 0B @@ -393,19 +393,19 @@ Ingestions: 0 as flushable: 0 (0B in 0 tables) Iter category stats: b, latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms} c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s} - pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms} + pebble-compaction, non-latency: {BlockBytes:305 BlockBytesInCache:44 BlockReadDuration:60ms} additional-metrics ---- block bytes written: __level___data-block__value-block - 0 198B 38B + 0 202B 38B 1 0B 0B 2 0B 0B 3 0B 0B 4 0B 0B 5 0B 0B - 6 143B 41B + 6 140B 41B # Flushable ingestion metrics. This requires there be data in a memtable that # would overlap with the ingested table(s). Delayed flushes are disabled here to @@ -497,8 +497,8 @@ Ingestions: 2 as flushable: 2 (1.7KB in 3 tables) Iter category stats: b, latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms} c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s} - pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms} - pebble-ingest, latency: {BlockBytes:64 BlockBytesInCache:0 BlockReadDuration:10ms} + pebble-compaction, non-latency: {BlockBytes:305 BlockBytesInCache:44 BlockReadDuration:60ms} + pebble-ingest, latency: {BlockBytes:63 BlockBytesInCache:0 BlockReadDuration:10ms} batch set g g @@ -560,8 +560,8 @@ Ingestions: 2 as flushable: 2 (1.7KB in 3 tables) Iter category stats: b, latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms} c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s} - pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms} - pebble-ingest, latency: {BlockBytes:64 BlockBytesInCache:0 BlockReadDuration:10ms} + pebble-compaction, non-latency: {BlockBytes:305 BlockBytesInCache:44 BlockReadDuration:60ms} + pebble-ingest, latency: {BlockBytes:63 BlockBytesInCache:0 BlockReadDuration:10ms} build ext1 set z z @@ -601,7 +601,7 @@ virtual-size 1.2KB 2 2 -102B +92B metrics zero-cache-hits-misses ---- @@ -624,7 +624,7 @@ Compactions: 2 estimated debt: 5.6KB in progress: 0 (0B) MemTables: 1 (1.0MB) zombie: 1 (1.0MB) Zombie tables: 0 (0B, local: 0B) Backing tables: 2 (1.2KB) -Virtual tables: 2 (102B) +Virtual tables: 2 (92B) Local tables size: 6.7KB Compression types: snappy: 9 unknown: 2 Block cache: 0 entries (0B) hit rate: 0.0% @@ -637,8 +637,8 @@ Ingestions: 3 as flushable: 2 (1.7KB in 3 tables) Iter category stats: b, latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms} c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s} - pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms} - pebble-ingest, latency: {BlockBytes:200 BlockBytesInCache:0 BlockReadDuration:30ms} + pebble-compaction, non-latency: {BlockBytes:305 BlockBytesInCache:44 BlockReadDuration:60ms} + pebble-ingest, latency: {BlockBytes:189 BlockBytesInCache:0 BlockReadDuration:30ms} # Virtualize a virtual sstable. build ext1 @@ -679,7 +679,7 @@ virtual-size 1.2KB 2 2 -102B +92B compact a-z ---- @@ -739,8 +739,8 @@ Ingestions: 4 as flushable: 2 (1.7KB in 3 tables) Iter category stats: b, latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms} c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s} - pebble-compaction, non-latency: {BlockBytes:677 BlockBytesInCache:376 BlockReadDuration:70ms} - pebble-ingest, latency: {BlockBytes:272 BlockBytesInCache:72 BlockReadDuration:30ms} + pebble-compaction, non-latency: {BlockBytes:670 BlockBytesInCache:365 BlockReadDuration:70ms} + pebble-ingest, latency: {BlockBytes:252 BlockBytesInCache:63 BlockReadDuration:30ms} # Create a DB where lower levels are written as shared tables. All ingests also # become shared tables. @@ -764,14 +764,14 @@ metrics | | | | ingested | moved | written | | amp level | tables size val-bl vtables | score | in | tables size | tables size | tables size | read | r w ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+--------- - 0 | 1 604B 0B 0 | 0.25 | 38B | 0 0B | 0 0B | 1 604B | 0B | 1 15.9 + 0 | 1 602B 0B 0 | 0.25 | 38B | 0 0B | 0 0B | 1 602B | 0B | 1 15.8 1 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 2 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 6 | 0 0B 0B 0 | - | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 -total | 1 604B 0B 0 | - | 38B | 0 0B | 0 0B | 1 642B | 0B | 1 16.9 +total | 1 602B 0B 0 | - | 38B | 0 0B | 0 0B | 1 640B | 0B | 1 16.8 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 27B written: 38B (41% overhead) Flushes: 1 @@ -781,7 +781,7 @@ MemTables: 1 (256KB) zombie: 1 (256KB) Zombie tables: 0 (0B, local: 0B) Backing tables: 0 (0B) Virtual tables: 0 (0B) -Local tables size: 604B +Local tables size: 602B Compression types: snappy: 1 Block cache: 0 entries (0B) hit rate: 0.0% Table cache: 0 entries (0B) hit rate: 0.0% @@ -802,14 +802,14 @@ metrics | | | | ingested | moved | written | | amp level | tables size val-bl vtables | score | in | tables size | tables size | tables size | read | r w ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+--------- - 0 | 0 0B 0B 0 | 0.00 | 38B | 0 0B | 0 0B | 1 604B | 0B | 0 15.9 + 0 | 0 0B 0B 0 | 0.00 | 38B | 0 0B | 0 0B | 1 602B | 0B | 0 15.8 1 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 2 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 - 6 | 1 604B 0B 0 | - | 604B | 0 0B | 0 0B | 1 604B | 0B | 1 1.0 -total | 1 604B 0B 0 | - | 38B | 0 0B | 0 0B | 2 1.2KB | 0B | 1 32.8 + 6 | 1 602B 0B 0 | - | 602B | 0 0B | 0 0B | 1 602B | 0B | 1 1.0 +total | 1 602B 0B 0 | - | 38B | 0 0B | 0 0B | 2 1.2KB | 0B | 1 32.7 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 27B written: 38B (41% overhead) Flushes: 1 @@ -849,13 +849,13 @@ metrics | | | | ingested | moved | written | | amp level | tables size val-bl vtables | score | in | tables size | tables size | tables size | read | r w ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+--------- - 0 | 1 589B 0B 0 | 0.25 | 38B | 1 589B | 0 0B | 1 604B | 0B | 1 15.9 + 0 | 1 589B 0B 0 | 0.25 | 38B | 1 589B | 0 0B | 1 602B | 0B | 1 15.8 1 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 2 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 - 6 | 1 604B 0B 0 | - | 604B | 0 0B | 0 0B | 1 604B | 0B | 1 1.0 + 6 | 1 602B 0B 0 | - | 602B | 0 0B | 0 0B | 1 602B | 0B | 1 1.0 total | 2 1.2KB 0B 0 | - | 627B | 1 589B | 0 0B | 2 1.8KB | 0B | 2 2.9 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 27B written: 38B (41% overhead) @@ -876,7 +876,7 @@ Table iters: 0 Filter utility: 0.0% Ingestions: 1 as flushable: 0 (0B in 0 tables) Iter category stats: - pebble-ingest, latency: {BlockBytes:59 BlockBytesInCache:0 BlockReadDuration:10ms} + pebble-ingest, latency: {BlockBytes:57 BlockBytesInCache:0 BlockReadDuration:10ms} batch set b 3 @@ -897,13 +897,13 @@ metrics | | | | ingested | moved | written | | amp level | tables size val-bl vtables | score | in | tables size | tables size | tables size | read | r w ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+--------- - 0 | 2 1.2KB 0B 0 | 0.50 | 66B | 1 589B | 0 0B | 2 1.2KB | 0B | 2 18.1 + 0 | 2 1.2KB 0B 0 | 0.50 | 66B | 1 589B | 0 0B | 2 1.2KB | 0B | 2 18.0 1 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 2 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 - 6 | 1 604B 0B 0 | - | 604B | 0 0B | 0 0B | 1 604B | 0B | 1 1.0 + 6 | 1 602B 0B 0 | - | 602B | 0 0B | 0 0B | 1 602B | 0B | 1 1.0 total | 3 1.7KB 0B 0 | - | 655B | 1 589B | 0 0B | 3 2.4KB | 0B | 3 3.7 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 44B written: 66B (50% overhead) @@ -924,7 +924,7 @@ Table iters: 0 Filter utility: 0.0% Ingestions: 1 as flushable: 0 (0B in 0 tables) Iter category stats: - pebble-ingest, latency: {BlockBytes:59 BlockBytesInCache:0 BlockReadDuration:10ms} + pebble-ingest, latency: {BlockBytes:57 BlockBytesInCache:0 BlockReadDuration:10ms} # Reopen DB, to ensure stats are consistent. Also, reopened DB is not # configured to write shared tables. @@ -942,7 +942,7 @@ level | tables size val-bl vtables | score | in | tables size | tables siz 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 - 6 | 1 604B 0B 0 | - | 0B | 0 0B | 0 0B | 0 0B | 0B | 1 0.0 + 6 | 1 602B 0B 0 | - | 0B | 0 0B | 0 0B | 0 0B | 0B | 1 0.0 total | 3 1.7KB 0B 0 | - | 0B | 0 0B | 0 0B | 0 0B | 0B | 3 0.0 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 0B written: 0B (0% overhead) @@ -1001,4 +1001,4 @@ Table iters: 0 Filter utility: 0.0% Ingestions: 0 as flushable: 0 (0B in 0 tables) Iter category stats: - pebble-compaction, non-latency: {BlockBytes:147 BlockBytesInCache:0 BlockReadDuration:30ms} + pebble-compaction, non-latency: {BlockBytes:145 BlockBytesInCache:0 BlockReadDuration:30ms} diff --git a/testdata/table_stats b/testdata/table_stats index 4ab5a40da8..cb53667dfc 100644 --- a/testdata/table_stats +++ b/testdata/table_stats @@ -15,7 +15,7 @@ wait-pending-table-stats num-entries: 3 num-deletions: 1 num-range-key-sets: 0 -point-deletions-bytes-estimate: 57 +point-deletions-bytes-estimate: 56 range-deletions-bytes-estimate: 0 compact a-c @@ -41,7 +41,7 @@ num-entries: 1 num-deletions: 1 num-range-key-sets: 0 point-deletions-bytes-estimate: 0 -range-deletions-bytes-estimate: 51 +range-deletions-bytes-estimate: 43 reopen ---- @@ -60,7 +60,7 @@ num-entries: 1 num-deletions: 1 num-range-key-sets: 0 point-deletions-bytes-estimate: 0 -range-deletions-bytes-estimate: 51 +range-deletions-bytes-estimate: 43 compact a-c ---- @@ -546,7 +546,7 @@ wait-pending-table-stats num-entries: 5 num-deletions: 2 num-range-key-sets: 0 -point-deletions-bytes-estimate: 112572 +point-deletions-bytes-estimate: 112552 range-deletions-bytes-estimate: 0 # Try a missized point tombstone. It should appear in the Metrics after the @@ -588,7 +588,7 @@ L0.0: metadata-stats file=5 ---- -size: 654 +size: 645 # Just grab the physical sstable properties as these are used to construct the # virtual sstable properties. @@ -605,7 +605,7 @@ rocksdb: rocksdb.compression: Snappy rocksdb.compression_options: window_bits=-14; level=32767; strategy=0; max_dict_bytes=0; zstd_max_train_bytes=0; enabled=0; rocksdb.comparator: pebble.internal.testkeys - rocksdb.data.size: 53 + rocksdb.data.size: 44 rocksdb.filter.size: 0 rocksdb.index.size: 27 rocksdb.block.based.table.index.type: 0 @@ -635,11 +635,11 @@ L6: metadata-stats file=7 ---- -size: 53 +size: 44 metadata-stats file=8 ---- -size: 53 +size: 44 # Note that the backing file size is much larger than the virtual file sizes. # For tiny sstables, the metadata contained in the sstable is much larger than @@ -651,7 +651,7 @@ size: 53 properties file=7 ---- rocksdb.num.entries: 1 -rocksdb.raw.key.size: 3 +rocksdb.raw.key.size: 2 rocksdb.raw.value.size: 1 pebble.raw.point-tombstone.key.size: 1 rocksdb.deleted.keys: 1 @@ -659,7 +659,7 @@ rocksdb.deleted.keys: 1 properties file=8 ---- rocksdb.num.entries: 1 -rocksdb.raw.key.size: 3 +rocksdb.raw.key.size: 2 rocksdb.raw.value.size: 1 pebble.raw.point-tombstone.key.size: 1 rocksdb.deleted.keys: 1 @@ -670,7 +670,7 @@ wait-pending-table-stats num-entries: 1 num-deletions: 1 num-range-key-sets: 0 -point-deletions-bytes-estimate: 39 +point-deletions-bytes-estimate: 44 range-deletions-bytes-estimate: 0 wait-pending-table-stats @@ -679,7 +679,7 @@ wait-pending-table-stats num-entries: 1 num-deletions: 1 num-range-key-sets: 0 -point-deletions-bytes-estimate: 39 +point-deletions-bytes-estimate: 44 range-deletions-bytes-estimate: 0 # Create an sstable with a range key set. @@ -713,7 +713,7 @@ rocksdb: rocksdb.compression: Snappy rocksdb.compression_options: window_bits=-14; level=32767; strategy=0; max_dict_bytes=0; zstd_max_train_bytes=0; enabled=0; rocksdb.comparator: pebble.internal.testkeys - rocksdb.data.size: 47 + rocksdb.data.size: 46 rocksdb.filter.size: 0 rocksdb.index.size: 27 rocksdb.block.based.table.index.type: 0 @@ -732,7 +732,7 @@ pebble: metadata-stats file=10 ---- -size: 756 +size: 755 build ext2 set z z @@ -755,11 +755,11 @@ L6: metadata-stats file=12 ---- -size: 47 +size: 46 metadata-stats file=13 ---- -size: 47 +size: 46 # range key sets shows up for both files. This is expected. properties file=12 diff --git a/tool/testdata/sstable_layout b/tool/testdata/sstable_layout index b80148788b..94a94b0104 100644 --- a/tool/testdata/sstable_layout +++ b/tool/testdata/sstable_layout @@ -6,26 +6,26 @@ sstable layout ../sstable/testdata/h.sst ---- h.sst - 0 data (1094) - 1099 data (1057) - 2161 data (1074) - 3240 data (1051) - 4296 data (1046) - 5347 data (1091) - 6443 data (996) - 7444 data (1060) - 8509 data (1051) - 9565 data (1016) - 10586 data (1026) - 11617 data (1100) - 12722 data (1025) - 13752 data (156) - 13913 index (245) - 14163 range-del (421) - 14589 properties (409) - 15003 meta-index (61) - 15069 footer (53) - 15122 EOF + 0 data (1072) + 1077 data (1038) + 2120 data (1075) + 3200 data (1033) + 4238 data (1040) + 5283 data (1072) + 6360 data (981) + 7346 data (1045) + 8396 data (1026) + 9427 data (1007) + 10439 data (1001) + 11445 data (1088) + 12538 data (1011) + 13554 data (153) + 13712 index (243) + 13960 range-del (421) + 14386 properties (409) + 14800 meta-index (61) + 14866 footer (53) + 14919 EOF sstable layout ../sstable/testdata/h.table-bloom.no-compression.sst diff --git a/tool/testdata/sstable_properties b/tool/testdata/sstable_properties index 161b8cc2b5..cd072285b6 100644 Binary files a/tool/testdata/sstable_properties and b/tool/testdata/sstable_properties differ diff --git a/tool/testdata/sstable_space b/tool/testdata/sstable_space index cfec706b04..7eeec249bd 100644 --- a/tool/testdata/sstable_space +++ b/tool/testdata/sstable_space @@ -7,35 +7,35 @@ requires at least 1 arg(s), only received 0 sstable space --start=a --end=a ../sstable/testdata/h.sst ---- -h.sst: 1099 +h.sst: 1077 # first data block through last key in first data block sstable space --start=a --end=beteem ../sstable/testdata/h.sst ---- -h.sst: 1099 +h.sst: 1077 # last key in first data block through first key in second data block sstable space --start=beteem --end=bethought ../sstable/testdata/h.sst ---- -h.sst: 2161 +h.sst: 2120 # last key in first data block through last key in last data block sstable space --start=beteem --end=youth ../sstable/testdata/h.sst ---- -h.sst: 13913 +h.sst: 13712 # second last key in last data block through last key in last data block sstable space --start=yourself --end=youth ../sstable/testdata/h.sst ---- -h.sst: 161 +h.sst: 158 # Two-level index: first key in first data block