github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/sstable/testdata/writer_v3 (about) 1 build 2 a.SET.1:a 3 ---- 4 point: [a#1,1-a#1,1] 5 seqnums: [1-1] 6 7 scan 8 ---- 9 a#1,1:a 10 11 scan-range-del 12 ---- 13 14 scan-range-key 15 ---- 16 17 build 18 a.SET.1:a 19 b.DEL.2: 20 c.MERGE.3:c 21 d.RANGEDEL.4:e 22 f.SET.5:f 23 g.DEL.6: 24 h.MERGE.7:h 25 i.RANGEDEL.8:j 26 rangekey: j-k:{(#9,RANGEKEYDEL)} 27 rangekey: k-l:{(#10,RANGEKEYUNSET,@t5)} 28 rangekey: l-m:{(#11,RANGEKEYSET,@t10,foo)} 29 ---- 30 point: [a#1,1-h#7,2] 31 rangedel: [d#4,15-j#72057594037927935,15] 32 rangekey: [j#9,19-m#72057594037927935,21] 33 seqnums: [1-11] 34 35 build 36 a.SET.1:a 37 b.DEL.2: 38 c.MERGE.3:c 39 d.RANGEDEL.4:e 40 f.SET.5:f 41 g.DEL.6: 42 h.MERGE.7:h 43 i.RANGEDEL.8:j 44 ---- 45 point: [a#1,1-h#7,2] 46 rangedel: [d#4,15-j#72057594037927935,15] 47 seqnums: [1-8] 48 49 scan 50 ---- 51 a#1,1:a 52 b#2,0: 53 c#3,2:c 54 f#5,1:f 55 g#6,0: 56 h#7,2:h 57 58 scan-range-del 59 ---- 60 d-e:{(#4,RANGEDEL)} 61 i-j:{(#8,RANGEDEL)} 62 63 # 3: a-----------m 64 # 2: f------------s 65 # 1: j---------------z 66 67 build 68 a.RANGEDEL.3:m 69 f.RANGEDEL.2:s 70 j.RANGEDEL.1:z 71 ---- 72 rangedel: [a#3,15-z#72057594037927935,15] 73 seqnums: [1-3] 74 75 scan 76 ---- 77 78 scan-range-del 79 ---- 80 a-f:{(#3,RANGEDEL)} 81 f-j:{(#3,RANGEDEL) (#2,RANGEDEL)} 82 j-m:{(#3,RANGEDEL) (#2,RANGEDEL) (#1,RANGEDEL)} 83 m-s:{(#2,RANGEDEL) (#1,RANGEDEL)} 84 s-z:{(#1,RANGEDEL)} 85 86 scan-range-key 87 ---- 88 89 # The range tombstone upper bound is exclusive, so a point operation 90 # on that same key will be the actual boundary. 91 92 build 93 a.RANGEDEL.3:b 94 b.SET.4:c 95 ---- 96 point: [b#4,1-b#4,1] 97 rangedel: [a#3,15-b#72057594037927935,15] 98 seqnums: [3-4] 99 100 build 101 a.RANGEDEL.3:b 102 b.SET.2:c 103 ---- 104 point: [b#2,1-b#2,1] 105 rangedel: [a#3,15-b#72057594037927935,15] 106 seqnums: [2-3] 107 108 build 109 a.RANGEDEL.3:c 110 b.SET.2:c 111 ---- 112 point: [b#2,1-b#2,1] 113 rangedel: [a#3,15-c#72057594037927935,15] 114 seqnums: [2-3] 115 116 # Keys must be added in order. 117 118 build 119 a.SET.1:b 120 a.SET.2:c 121 ---- 122 pebble: keys must be added in strictly increasing order: a#1,SET, a#2,SET 123 124 build 125 b.SET.1:a 126 a.SET.2:b 127 ---- 128 pebble: keys must be added in strictly increasing order: b#1,SET, a#2,SET 129 130 build 131 b.RANGEDEL.1:c 132 a.RANGEDEL.2:b 133 ---- 134 pebble: keys must be added in order: b > a 135 136 build-raw 137 .RANGEDEL.1:b 138 ---- 139 rangedel: [#1,15-b#72057594037927935,15] 140 seqnums: [1-1] 141 142 build-raw 143 a.RANGEDEL.1:c 144 a.RANGEDEL.2:c 145 ---- 146 pebble: keys must be added in strictly increasing order: a#1,RANGEDEL, a#2,RANGEDEL 147 148 build-raw 149 a.RANGEDEL.1:c 150 b.RANGEDEL.2:d 151 ---- 152 pebble: overlapping tombstones must be fragmented: a-c:{(#1,RANGEDEL)} vs b-d:{(#2,RANGEDEL)} 153 154 build-raw 155 a.RANGEDEL.2:c 156 a.RANGEDEL.1:d 157 ---- 158 pebble: overlapping tombstones must be fragmented: a-c:{(#2,RANGEDEL)} vs a-d:{(#1,RANGEDEL)} 159 160 build-raw 161 a.RANGEDEL.1:c 162 c.RANGEDEL.2:d 163 ---- 164 rangedel: [a#1,15-d#72057594037927935,15] 165 seqnums: [1-2] 166 167 build-raw 168 rangekey: a-b:{(#1,RANGEKEYSET,@t10,foo)} 169 rangekey: a-b:{(#2,RANGEKEYSET,@t10,foo)} 170 ---- 171 rangekey: [a#2,21-b#72057594037927935,21] 172 seqnums: [1-2] 173 174 build-raw 175 rangekey: b-c:{(#2,RANGEKEYSET,@t10,foo)} 176 rangekey: a-b:{(#1,RANGEKEYSET,@t10,foo)} 177 ---- 178 pebble: spans must be added in order: b > a 179 180 build-raw 181 a.RANGEKEYDEL.1:c 182 b.RANGEKEYDEL.2:d 183 ---- 184 pebble: overlapping range keys must be fragmented: a#1,RANGEKEYDEL, b#2,RANGEKEYDEL 185 186 build-raw 187 a.RANGEKEYDEL.2:c 188 a.RANGEKEYDEL.1:d 189 ---- 190 pebble: overlapping range keys must be fragmented: a#2,RANGEKEYDEL, a#1,RANGEKEYDEL 191 192 build-raw 193 rangekey: a-c:{(#1,RANGEKEYSET,@t10,foo)} 194 rangekey: c-d:{(#2,RANGEKEYSET,@t10,foo)} 195 ---- 196 rangekey: [a#1,21-d#72057594037927935,21] 197 seqnums: [1-2] 198 199 # Range keys may have perfectly aligned spans (including sequence numbers), 200 # though the key kinds must be ordered (descending). 201 202 build-raw 203 a.RANGEKEYDEL.1:b 204 a.RANGEKEYDEL.1:b 205 ---- 206 pebble: range keys starts must be added in increasing order: a#1,RANGEKEYDEL, a#1,RANGEKEYDEL 207 208 build-raw 209 rangekey: a-b:{(#1,RANGEKEYSET,@t10,foo) (#1,RANGEKEYUNSET,@t10) (#1,RANGEKEYDEL)} 210 ---- 211 rangekey: [a#1,21-b#72057594037927935,19] 212 seqnums: [1-1] 213 214 # The range-del-v1 format supports unfragmented and unsorted range 215 # tombstones. 216 217 build-raw range-del-v1 218 a.RANGEDEL.1:c 219 a.RANGEDEL.2:c 220 ---- 221 rangedel: [a#2,15-c#72057594037927935,15] 222 seqnums: [1-2] 223 224 scan-range-del 225 ---- 226 a-c:{(#2,RANGEDEL) (#1,RANGEDEL)} 227 228 build-raw range-del-v1 229 a.RANGEDEL.1:c 230 b.RANGEDEL.2:d 231 ---- 232 rangedel: [a#1,15-d#72057594037927935,15] 233 seqnums: [1-2] 234 235 scan-range-del 236 ---- 237 a-b:{(#1,RANGEDEL)} 238 b-c:{(#2,RANGEDEL) (#1,RANGEDEL)} 239 c-d:{(#2,RANGEDEL)} 240 241 build-raw range-del-v1 242 a.RANGEDEL.2:c 243 a.RANGEDEL.1:d 244 ---- 245 rangedel: [a#2,15-d#72057594037927935,15] 246 seqnums: [1-2] 247 248 scan-range-del 249 ---- 250 a-c:{(#2,RANGEDEL) (#1,RANGEDEL)} 251 c-d:{(#1,RANGEDEL)} 252 253 # This matches an early test case, except we're passing overlapping 254 # range tombstones to the sstable writer and requiring them to be 255 # fragmented at read time. 256 257 build-raw range-del-v1 258 j.RANGEDEL.1:z 259 f.RANGEDEL.2:s 260 a.RANGEDEL.3:m 261 ---- 262 rangedel: [a#3,15-z#72057594037927935,15] 263 seqnums: [1-3] 264 265 scan-range-del 266 ---- 267 a-f:{(#3,RANGEDEL)} 268 f-j:{(#3,RANGEDEL) (#2,RANGEDEL)} 269 j-m:{(#3,RANGEDEL) (#2,RANGEDEL) (#1,RANGEDEL)} 270 m-s:{(#2,RANGEDEL) (#1,RANGEDEL)} 271 s-z:{(#1,RANGEDEL)} 272 273 # Setting a very small index-block-size results in a two-level index. 274 275 build block-size=1 index-block-size=1 276 a.SET.1:a 277 b.SET.1:b 278 c.SET.1:c 279 ---- 280 point: [a#1,1-c#1,1] 281 seqnums: [1-1] 282 283 layout 284 ---- 285 0 data (22) 286 27 data (22) 287 54 data (22) 288 81 index (22) 289 108 index (22) 290 135 index (22) 291 162 top-index (51) 292 218 properties (580) 293 803 meta-index (33) 294 841 footer (53) 295 894 EOF 296 297 scan 298 ---- 299 a#1,1:a 300 b#1,1:b 301 c#1,1:c 302 303 # Enabling leveldb format disables the creation of a two-level index 304 # (the input data here mirrors the test case above). 305 306 build leveldb block-size=1 index-block-size=1 307 a.SET.1:a 308 b.SET.1:b 309 c.SET.1:c 310 ---- 311 point: [a#1,1-c#1,1] 312 seqnums: [1-1] 313 314 layout 315 ---- 316 0 data (21) 317 26 data (21) 318 52 data (21) 319 78 index (47) 320 130 properties (678) 321 813 meta-index (33) 322 851 leveldb-footer (48) 323 899 EOF 324 325 # Range keys, if present, are shown in the layout. 326 327 build 328 rangekey: a-b:{(#3,RANGEKEYSET,@t3,foo)} 329 rangekey: b-c:{(#2,RANGEKEYSET,@t2,bar)} 330 rangekey: c-d:{(#1,RANGEKEYSET,@t1,baz)} 331 ---- 332 rangekey: [a#3,21-d#72057594037927935,21] 333 seqnums: [1-3] 334 335 layout 336 ---- 337 0 data (8) 338 13 index (21) 339 39 range-key (82) 340 126 properties (628) 341 759 meta-index (57) 342 821 footer (53) 343 874 EOF