1
1
# Size of value index is 3 bytes plus 5 + 5 = 10 bytes of trailer of the value
2
- # block and value index block. So size 18 - 13 = 5 size of the value in the
2
+ # block and value index block. So size 17 - 13 = 4 size of the value in the
3
3
# value block.
4
+ # N.B. The only key kind eligible for separation is `SET`.
4
5
build table-format=Pebble,v4
5
6
a@2.SET.1:a2
6
7
b@5.SET.7:b5
7
8
b@4.DEL.3:
8
9
b@3.SET.2:bat3
9
- b@2.SET.1:vbat2
10
+ b@2.SETWITHDEL.1:bat2
11
+ b@1.SET.1:bat1
12
+ b@0.SET.0:bat0
10
13
----
11
- value-blocks: num-values 1, num-blocks: 1, size: 18
14
+ value-blocks: num-values 1, num-blocks: 1, size: 17
12
15
13
16
scan-raw
14
17
----
15
18
a@2#1,SET:in-place a2, same-pre false
16
19
b@5#7,SET:in-place b5, same-pre false
17
20
b@4#3,DEL:
18
21
b@3#2,SET:in-place bat3, same-pre false
19
- b@2#1,SET:value-handle len 5 block 0 offset 0, att 5, same-pre true
22
+ b@2#1,SETWITHDEL:bat2
23
+ b@1#1,SET:in-place bat1, same-pre false
24
+ b@0#0,SET:value-handle len 4 block 0 offset 0, att 4, same-pre true
20
25
21
26
scan
22
27
----
23
28
a@2#1,SET:a2
24
29
b@5#7,SET:b5
25
30
b@4#3,DEL:
26
31
b@3#2,SET:bat3
27
- b@2#1,SET:vbat2
32
+ b@2#1,SETWITHDEL:bat2
33
+ b@1#1,SET:bat1
34
+ b@0#0,SET:bat0
28
35
29
36
scan-cloned-lazy-values
30
37
----
31
38
0(in-place: len 2): a2
32
39
1(in-place: len 2): b5
33
40
2(in-place: len 0):
34
41
3(in-place: len 4): bat3
35
- 4(lazy: len 5, attr: 5): vbat2
42
+ 4(in-place: len 4): bat2
43
+ 5(in-place: len 4): bat1
44
+ 6(lazy: len 4, attr: 4): bat0
36
45
37
46
# Repeat the above test with (Pebble,v5) [columnar blocks].
47
+ # N.B. The key kinds eligible for separation when writing columnar blocks are
48
+ # `SET` and `SETWITHDEL`.
38
49
50
+ # Since we end up separating the SETWITHDEL key, this means 2 more values are
51
+ # stored (each with a 4 byte value). This increases the size of the value block
52
+ # by 8 bytes, making the total size 25.
39
53
build table-format=Pebble,v5
40
54
a@2.SET.1:a2
41
55
b@5.SET.7:b5
42
56
b@4.DEL.3:
43
57
b@3.SET.2:bat3
44
- b@2.SET.1:vbat2
58
+ b@2.SETWITHDEL.1:bat2
59
+ b@1.SET.1:bat1
60
+ b@0.SET.0:bat0
45
61
----
46
- value-blocks: num-values 1 , num-blocks: 1, size: 18
62
+ value-blocks: num-values 3 , num-blocks: 1, size: 25
47
63
48
64
scan
49
65
----
50
66
a@2#1,SET:a2
51
67
b@5#7,SET:b5
52
68
b@4#3,DEL:
53
69
b@3#2,SET:bat3
54
- b@2#1,SET:vbat2
70
+ b@2#1,SETWITHDEL:bat2
71
+ b@1#1,SET:bat1
72
+ b@0#0,SET:bat0
55
73
56
74
scan-cloned-lazy-values
57
75
----
58
76
0(in-place: len 2): a2
59
77
1(in-place: len 2): b5
60
78
2(in-place: len 0):
61
79
3(in-place: len 4): bat3
62
- 4(lazy: len 5, attr: 5): vbat2
80
+ 4(lazy: len 4, attr: 4): bat2
81
+ 5(lazy: len 4, attr: 4): bat1
82
+ 6(lazy: len 4, attr: 4): bat0
63
83
64
84
# Same data as previous, with disable-value-blocks set to true
65
85
build disable-value-blocks=true table-format=Pebble,v4
66
86
a@2.SET.1:a2
67
87
b@5.SET.7:b5
68
88
b@4.DEL.3:
69
89
b@3.SET.2:bat3
70
- b@2.SET.1:vbat2
90
+ b@2.SETWITHDEL.1:bat2
91
+ b@1.SET.1:bat1
92
+ b@0.SET.0:bat0
71
93
----
72
94
value-blocks: num-values 0, num-blocks: 0, size: 0
73
95
@@ -77,15 +99,19 @@ a@2#1,SET:in-place a2, same-pre false
77
99
b@5#7,SET:in-place b5, same-pre false
78
100
b@4#3,DEL:
79
101
b@3#2,SET:in-place bat3, same-pre false
80
- b@2#1,SET:in-place vbat2, same-pre true
102
+ b@2#1,SETWITHDEL:bat2
103
+ b@1#1,SET:in-place bat1, same-pre false
104
+ b@0#0,SET:in-place bat0, same-pre true
81
105
82
106
scan
83
107
----
84
108
a@2#1,SET:a2
85
109
b@5#7,SET:b5
86
110
b@4#3,DEL:
87
111
b@3#2,SET:bat3
88
- b@2#1,SET:vbat2
112
+ b@2#1,SETWITHDEL:bat2
113
+ b@1#1,SET:bat1
114
+ b@0#0,SET:bat0
89
115
90
116
# Same as above but with (Pebble,v5) [columnar blocks].
91
117
@@ -94,7 +120,9 @@ a@2.SET.1:a2
94
120
b@5.SET.7:b5
95
121
b@4.DEL.3:
96
122
b@3.SET.2:bat3
97
- b@2.SET.1:vbat2
123
+ b@2.SETWITHDEL.1:bat2
124
+ b@1.SET.1:bat1
125
+ b@0.SET.0:bat0
98
126
----
99
127
value-blocks: num-values 0, num-blocks: 0, size: 0
100
128
@@ -104,7 +132,9 @@ a@2#1,SET:a2
104
132
b@5#7,SET:b5
105
133
b@4#3,DEL:
106
134
b@3#2,SET:bat3
107
- b@2#1,SET:vbat2
135
+ b@2#1,SETWITHDEL:bat2
136
+ b@1#1,SET:bat1
137
+ b@0#0,SET:bat0
108
138
109
139
# Size of value index is 3 bytes plus 5 + 5 = 10 bytes of trailer of the value
110
140
# block and value index block. So size 33 - 13 = 20 is the total size of the
0 commit comments