github.com/zuoyebang/bitalostable@v1.0.1-0.20240229032404-e3b99a834294/testdata/level_iter_boundaries (about) 1 build 2 a.RANGEDEL.1:c 3 b.RANGEDEL.2:d 4 ---- 5 0: a#1,15-d#72057594037927935,15 6 7 iter 8 first 9 next 10 last 11 prev 12 ---- 13 d#72057594037927935,15: 14 . 15 a#1,15: 16 . 17 18 iter 19 seek-ge c 20 seek-ge d 21 seek-lt b 22 prev 23 ---- 24 d#72057594037927935,15: 25 . 26 a#1,15: 27 . 28 29 iter 30 seek-prefix-ge c 31 seek-prefix-ge d 32 seek-lt b 33 prev 34 ---- 35 d#72057594037927935,15: 36 . 37 a#1,15: 38 . 39 40 iter 41 seek-ge e 42 seek-lt a 43 ---- 44 . 45 . 46 47 iter 48 seek-prefix-ge e 49 seek-lt a 50 ---- 51 . 52 . 53 54 clear 55 ---- 56 57 build 58 a.SET.1:a 59 ---- 60 0: a#1,1-a#1,1 61 62 build 63 b.RANGEDEL.2:c 64 ---- 65 0: a#1,1-a#1,1 66 1: b#2,15-c#72057594037927935,15 67 68 build 69 c.SET.3:c 70 ---- 71 0: a#1,1-a#1,1 72 1: b#2,15-c#72057594037927935,15 73 2: c#3,1-c#3,1 74 75 iter 76 first 77 next 78 next 79 next 80 ---- 81 a#1,1:a 82 c#72057594037927935,15: 83 c#3,1:c 84 . 85 86 iter 87 last 88 prev 89 prev 90 prev 91 ---- 92 c#3,1:c 93 b#2,15: 94 a#1,1:a 95 . 96 97 clear 98 ---- 99 100 build 101 a.SET.1:b 102 b.RANGEDEL.2:c 103 ---- 104 0: a#1,1-c#72057594037927935,15 105 106 iter 107 first 108 next 109 next 110 ---- 111 a#1,1:b 112 c#72057594037927935,15: 113 . 114 115 iter 116 last 117 prev 118 ---- 119 a#1,1:b 120 . 121 122 clear 123 ---- 124 125 build 126 a.RANGEDEL.1:b 127 c.SET.2:c 128 ---- 129 0: a#1,15-c#2,1 130 131 iter 132 first 133 next 134 ---- 135 c#2,1:c 136 . 137 138 iter 139 last 140 prev 141 prev 142 ---- 143 c#2,1:c 144 a#1,15: 145 . 146 147 # Regression test to check that Seek{GE,LT} work properly in certain 148 # cases when then levelIter is positioned at a boundary key. 149 150 clear 151 ---- 152 153 build 154 d.SET.3:d 155 c.RANGEDEL.2:e 156 ---- 157 0: c#2,15-e#72057594037927935,15 158 159 iter 160 seek-ge d 161 next 162 seek-ge d 163 next 164 seek-lt e 165 prev 166 seek-ge d 167 prev 168 seek-lt e 169 ---- 170 d#3,1:d 171 e#72057594037927935,15: 172 d#3,1:d 173 e#72057594037927935,15: 174 d#3,1:d 175 c#2,15: 176 d#3,1:d 177 c#2,15: 178 d#3,1:d 179 180 # Regression test to check that Seek{GE,LT}, First, and Last do not 181 # have iteration bounds affected by SeekPrefixGE. Previously, 182 # SeekPrefixGE adjusted the iteration upper bound which would leak 183 # over to other positioning operations. While SeekPrefixGE no longer 184 # has this behavior, it is good to check the iteration bounds handling 185 # regardless. 186 187 clear 188 ---- 189 190 build 191 b.SET.4:b 192 d.SET.3:d 193 ---- 194 0: b#4,1-d#3,1 195 196 iter 197 seek-prefix-ge c 198 seek-ge d 199 next 200 ---- 201 . 202 d#3,1:d 203 . 204 205 iter 206 seek-prefix-ge c 207 seek-lt e 208 next 209 ---- 210 . 211 d#3,1:d 212 . 213 214 iter 215 seek-prefix-ge c 216 first 217 next 218 next 219 ---- 220 . 221 b#4,1:b 222 d#3,1:d 223 . 224 225 iter 226 seek-prefix-ge c 227 last 228 next 229 ---- 230 . 231 d#3,1:d 232 . 233 234 clear 235 ---- 236 237 build 238 a.SET.3:z 239 d.SET.4:z 240 ---- 241 0: a#3,1-d#4,1 242 243 build 244 e.SET.5:z 245 f.SET.6:z 246 g.RANGEDEL.2:h 247 ---- 248 0: a#3,1-d#4,1 249 1: e#5,1-h#72057594037927935,15 250 251 build 252 j.SET.6:z 253 ---- 254 0: a#3,1-d#4,1 255 1: e#5,1-h#72057594037927935,15 256 2: j#6,1-j#6,1 257 258 # Test cases to check that when the bounds are contained within a file, iterating 259 # beyond the bounds does not cause the levelIter to change to the next/prev file. 260 # This is not a correctness issue, but is a useful performance optimization and 261 # we want to verify that the code does what we want it to. 262 iter save 263 set-bounds lower=a upper=b 264 seek-ge a 265 next 266 ---- 267 a#3,1:z 268 . 269 270 file-pos 271 ---- 272 file 0 273 274 iter save continue 275 seek-prefix-ge a 276 next 277 ---- 278 a#3,1:z 279 . 280 281 file-pos 282 ---- 283 file 0 284 285 iter save continue 286 set-bounds lower=b upper=c 287 seek-ge b 288 ---- 289 . 290 291 file-pos 292 ---- 293 file 0 294 295 iter save continue 296 seek-prefix-ge b 297 ---- 298 . 299 300 file-pos 301 ---- 302 file 0 303 304 # Seek to an earlier position just as a sanity check. 305 iter save continue 306 set-bounds lower=a upper=b 307 seek-ge a 308 next 309 ---- 310 a#3,1:z 311 . 312 313 file-pos 314 ---- 315 file 0 316 317 iter save continue 318 set-bounds lower=d upper=e 319 seek-ge d 320 next 321 ---- 322 d#4,1:z 323 . 324 325 file-pos 326 ---- 327 file 1 328 329 iter save continue 330 seek-prefix-ge d 331 next 332 ---- 333 d#4,1:z 334 . 335 336 file-pos 337 ---- 338 file 1 339 340 iter save continue 341 set-bounds lower=e upper=f 342 seek-ge e 343 next 344 next 345 ---- 346 e#5,1:z 347 f#72057594037927935,15: 348 . 349 350 file-pos 351 ---- 352 file 1 353 354 iter save continue 355 seek-lt f 356 prev 357 prev 358 ---- 359 e#5,1:z 360 . 361 . 362 363 file-pos 364 ---- 365 file 0 366 367 iter save continue 368 set-bounds lower=f upper=g 369 seek-lt g 370 prev 371 prev 372 ---- 373 f#6,1:z 374 f#72057594037927935,15: 375 . 376 377 file-pos 378 ---- 379 file 1 380 381 iter continue 382 ----