Skip to content

Commit b0d4682

Browse files
committed
db: remove redundant blob files in datadriven output
Now that the Version.DebugString prints a Version's blob files, the datadriven test helpers don't need to explicitly print it too.
1 parent f4e9b0c commit b0d4682

File tree

3 files changed

+0
-86
lines changed

3 files changed

+0
-86
lines changed

data_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,13 +1640,6 @@ func describeLSM(d *DB, verbose bool) string {
16401640
} else {
16411641
buf.WriteString(d.mu.versions.currentVersion().String())
16421642
}
1643-
if blobFileMetas := d.mu.versions.latest.blobFiles.Metadatas(); len(blobFileMetas) > 0 {
1644-
buf.WriteString("Blob files:\n")
1645-
for _, meta := range blobFileMetas {
1646-
fmt.Fprintf(&buf, " %s: [%s] %d physical bytes, %d value bytes\n",
1647-
meta.FileID, meta.Physical.FileNum, meta.Physical.Size, meta.Physical.ValueSize)
1648-
}
1649-
}
16501643
return buf.String()
16511644
}
16521645

testdata/compaction/value_separation

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ L6:
1515
000005:[a#10,SET-b#11,SET] seqnums:[10-11] points:[a#10,SET-b#11,SET] size:821 blobrefs:[(B000006: 2); depth:1]
1616
Blob files:
1717
B000006 physical:{000006 size:[92 (92B)] vals:[2 (2B)]}
18-
Blob files:
19-
B000006: [000006] 92 physical bytes, 2 value bytes
2018

2119
batch
2220
set c 3
@@ -31,9 +29,6 @@ L6:
3129
Blob files:
3230
B000006 physical:{000006 size:[92 (92B)] vals:[2 (2B)]}
3331
B000009 physical:{000009 size:[92 (92B)] vals:[2 (2B)]}
34-
Blob files:
35-
B000006: [000006] 92 physical bytes, 2 value bytes
36-
B000009: [000009] 92 physical bytes, 2 value bytes
3732

3833
batch
3934
set b 5
@@ -48,10 +43,6 @@ Blob files:
4843
B000006 physical:{000006 size:[92 (92B)] vals:[2 (2B)]}
4944
B000009 physical:{000009 size:[92 (92B)] vals:[2 (2B)]}
5045
B000012 physical:{000012 size:[92 (92B)] vals:[2 (2B)]}
51-
Blob files:
52-
B000006: [000006] 92 physical bytes, 2 value bytes
53-
B000009: [000009] 92 physical bytes, 2 value bytes
54-
B000012: [000012] 92 physical bytes, 2 value bytes
5546

5647
batch
5748
del-range a e
@@ -97,11 +88,6 @@ Blob files:
9788
B100002 physical:{100002 size:[92 (92B)] vals:[3 (3B)]}
9889
B100003 physical:{100003 size:[92 (92B)] vals:[3 (3B)]}
9990
B100004 physical:{100004 size:[92 (92B)] vals:[3 (3B)]}
100-
Blob files:
101-
B000007: [000007] 100 physical bytes, 10 value bytes
102-
B100002: [100002] 92 physical bytes, 3 value bytes
103-
B100003: [100003] 92 physical bytes, 3 value bytes
104-
B100004: [100004] 92 physical bytes, 3 value bytes
10591

10692
# Compacting these two sstables should result in writing the values to a new
10793
# blob file and the removal of the no longer referenced blob files.
@@ -112,8 +98,6 @@ L6:
11298
000008:[a#0,SET-z#0,SET] seqnums:[0-0] points:[a#0,SET-z#0,SET] size:870 blobrefs:[(B000009: 19); depth:1]
11399
Blob files:
114100
B000009 physical:{000009 size:[112 (112B)] vals:[19 (19B)]}
115-
Blob files:
116-
B000009: [000009] 112 physical bytes, 19 value bytes
117101

118102
# Ensure we can read the separated values by iterating over the database.
119103

@@ -206,8 +190,6 @@ L0.0:
206190
000005:[bar#10,SET-yaya#13,SET] seqnums:[10-13] points:[bar#10,SET-yaya#13,SET] size:772
207191
Blob files:
208192
B000008 physical:{000008 size:[100 (100B)] vals:[10 (10B)]}
209-
Blob files:
210-
B000008: [000008] 100 physical bytes, 10 value bytes
211193

212194
get
213195
a
@@ -244,8 +226,6 @@ L0.0:
244226
000006:[m#14,SET-m#14,SET] seqnums:[14-14] points:[m#14,SET-m#14,SET] size:817 blobrefs:[(B000007: 5); depth:1]
245227
Blob files:
246228
B000007 physical:{000007 size:[94 (94B)] vals:[5 (5B)]}
247-
Blob files:
248-
B000007: [000007] 94 physical bytes, 5 value bytes
249229

250230
# Construct an initial state with two overlapping files in L0, both with blob
251231
# references. Because these files overlap and are in separate sublevels, a
@@ -281,11 +261,6 @@ Blob files:
281261
B100002 physical:{100002 size:[92 (92B)] vals:[3 (3B)]}
282262
B100003 physical:{100003 size:[92 (92B)] vals:[3 (3B)]}
283263
B100004 physical:{100004 size:[92 (92B)] vals:[3 (3B)]}
284-
Blob files:
285-
B100001: [100001] 90 physical bytes, 1 value bytes
286-
B100002: [100002] 92 physical bytes, 3 value bytes
287-
B100003: [100003] 92 physical bytes, 3 value bytes
288-
B100004: [100004] 92 physical bytes, 3 value bytes
289264

290265
# Construct an initial state with two non-overlapping files in L0, both with
291266
# blob references. Because these files do NOT overlap and are in the same
@@ -321,11 +296,6 @@ Blob files:
321296
B100002 physical:{100002 size:[92 (92B)] vals:[3 (3B)]}
322297
B100003 physical:{100003 size:[92 (92B)] vals:[3 (3B)]}
323298
B100004 physical:{100004 size:[92 (92B)] vals:[3 (3B)]}
324-
Blob files:
325-
B100001: [100001] 90 physical bytes, 1 value bytes
326-
B100002: [100002] 92 physical bytes, 3 value bytes
327-
B100003: [100003] 92 physical bytes, 3 value bytes
328-
B100004: [100004] 92 physical bytes, 3 value bytes
329299

330300
define value-separation=(true,5,5) l0-compaction-threshold=1
331301
----
@@ -383,26 +353,6 @@ Blob files:
383353
B000038 physical:{000038 size:[1706254 (1.6MB)] vals:[1643840 (1.6MB)]}
384354
B000040 physical:{000040 size:[1707508 (1.6MB)] vals:[1645056 (1.6MB)]}
385355
B000042 physical:{000042 size:[886008 (865KB)] vals:[853568 (834KB)]}
386-
Blob files:
387-
B000006: [000006] 1704578 physical bytes, 1642240 value bytes
388-
B000008: [000008] 1704776 physical bytes, 1642432 value bytes
389-
B000010: [000010] 1705238 physical bytes, 1642880 value bytes
390-
B000012: [000012] 1704776 physical bytes, 1642432 value bytes
391-
B000014: [000014] 1702730 physical bytes, 1640448 value bytes
392-
B000016: [000016] 1704644 physical bytes, 1642304 value bytes
393-
B000018: [000018] 1707970 physical bytes, 1645504 value bytes
394-
B000020: [000020] 1702994 physical bytes, 1640704 value bytes
395-
B000022: [000022] 1705172 physical bytes, 1642816 value bytes
396-
B000024: [000024] 1703918 physical bytes, 1641600 value bytes
397-
B000026: [000026] 1703390 physical bytes, 1641088 value bytes
398-
B000028: [000028] 1704182 physical bytes, 1641856 value bytes
399-
B000030: [000030] 1702796 physical bytes, 1640512 value bytes
400-
B000032: [000032] 1703720 physical bytes, 1641408 value bytes
401-
B000034: [000034] 1706584 physical bytes, 1644160 value bytes
402-
B000036: [000036] 1703720 physical bytes, 1641408 value bytes
403-
B000038: [000038] 1706254 physical bytes, 1643840 value bytes
404-
B000040: [000040] 1707508 physical bytes, 1645056 value bytes
405-
B000042: [000042] 886008 physical bytes, 853568 value bytes
406356

407357
# Schedule automatic compactions. These compactions should write data to L6. The
408358
# resulting sstables will reference multiple blob files but maintain a blob
@@ -441,26 +391,6 @@ Blob files:
441391
B000038 physical:{000038 size:[1706254 (1.6MB)] vals:[1643840 (1.6MB)]}
442392
B000040 physical:{000040 size:[1707508 (1.6MB)] vals:[1645056 (1.6MB)]}
443393
B000042 physical:{000042 size:[886008 (865KB)] vals:[853568 (834KB)]}
444-
Blob files:
445-
B000006: [000006] 1704578 physical bytes, 1642240 value bytes
446-
B000008: [000008] 1704776 physical bytes, 1642432 value bytes
447-
B000010: [000010] 1705238 physical bytes, 1642880 value bytes
448-
B000012: [000012] 1704776 physical bytes, 1642432 value bytes
449-
B000014: [000014] 1702730 physical bytes, 1640448 value bytes
450-
B000016: [000016] 1704644 physical bytes, 1642304 value bytes
451-
B000018: [000018] 1707970 physical bytes, 1645504 value bytes
452-
B000020: [000020] 1702994 physical bytes, 1640704 value bytes
453-
B000022: [000022] 1705172 physical bytes, 1642816 value bytes
454-
B000024: [000024] 1703918 physical bytes, 1641600 value bytes
455-
B000026: [000026] 1703390 physical bytes, 1641088 value bytes
456-
B000028: [000028] 1704182 physical bytes, 1641856 value bytes
457-
B000030: [000030] 1702796 physical bytes, 1640512 value bytes
458-
B000032: [000032] 1703720 physical bytes, 1641408 value bytes
459-
B000034: [000034] 1706584 physical bytes, 1644160 value bytes
460-
B000036: [000036] 1703720 physical bytes, 1641408 value bytes
461-
B000038: [000038] 1706254 physical bytes, 1643840 value bytes
462-
B000040: [000040] 1707508 physical bytes, 1645056 value bytes
463-
B000042: [000042] 886008 physical bytes, 853568 value bytes
464394

465395

466396
excise-dryrun b c

testdata/iter_histories/blob_references

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ L6:
1717
000005:[b@2#2,SET-d@2#2,SET] seqnums:[2-2] points:[b@2#2,SET-d@2#2,SET] size:927 blobrefs:[(B000921: 6); depth:1]
1818
Blob files:
1919
B000921 physical:{000921 size:[106 (106B)] vals:[16 (16B)]}
20-
Blob files:
21-
B000921: [000921] 106 physical bytes, 16 value bytes
2220

2321
combined-iter
2422
first
@@ -80,9 +78,6 @@ L6:
8078
Blob files:
8179
B000039 physical:{000039 size:[117 (117B)] vals:[25 (25B)]}
8280
B000921 physical:{000921 size:[125 (125B)] vals:[33 (33B)]}
83-
Blob files:
84-
B000039: [000039] 117 physical bytes, 25 value bytes
85-
B000921: [000921] 125 physical bytes, 33 value bytes
8681

8782
# The iterator stats should indicate that only the first value from each file
8883
# should trigger a read of the blob file. Once loaded, subsequent reads of the
@@ -145,8 +140,6 @@ L6:
145140
000004:[a#2,SETWITHDEL-l#2,SETWITHDEL] seqnums:[2-2] points:[a#2,SETWITHDEL-l#2,SETWITHDEL] size:1031 blobrefs:[(B000009: 96); depth:1]
146141
Blob files:
147142
B000009 physical:{000009 size:[322 (322B)] vals:[96 (96B)]}
148-
Blob files:
149-
B000009: [000009] 322 physical bytes, 96 value bytes
150143

151144
combined-iter
152145
first
@@ -220,8 +213,6 @@ L6:
220213
000004:[a#5,RANGEKEYSET-d#inf,RANGEKEYSET] seqnums:[2-5] points:[b#2,SETWITHDEL-b#2,SETWITHDEL] ranges:[a#5,RANGEKEYSET-d#inf,RANGEKEYSET] size:1080 blobrefs:[(B000009: 7); depth:1]
221214
Blob files:
222215
B000009 physical:{000009 size:[96 (96B)] vals:[7 (7B)]}
223-
Blob files:
224-
B000009: [000009] 96 physical bytes, 7 value bytes
225216

226217
combined-iter
227218
seek-lt c

0 commit comments

Comments
 (0)