github.com/zuoyebang/bitalostable@v1.0.1-0.20240229032404-e3b99a834294/internal/manifest/testdata/version_check_ordering (about) 1 # Note: when specifying test cases with tables in L0, the L0 files should be 2 # specified in seqnum descending order, as the test case input is parsed as the 3 # inverse of `(*FileMetadata).DebugString`. 4 5 check-ordering 6 0: 7 000001:[a#1,SET-b#2,SET] 8 ---- 9 OK 10 11 check-ordering 12 0: 13 000002:[c#3,SET-d#4,SET] 14 000001:[a#1,SET-b#2,SET] 15 ---- 16 OK 17 18 check-ordering 19 0: 20 000002:[a#1,SET-b#2,SET] 21 000001:[c#3,SET-d#4,SET] 22 ---- 23 L0 files 000001 and 000002 are not properly ordered: <#3-#4> vs <#1-#2> 24 0.0: 25 000002:[a#1,SET-b#2,SET] points:[a#1,SET-b#2,SET] 26 000001:[c#3,SET-d#4,SET] points:[c#3,SET-d#4,SET] 27 28 check-ordering 29 0: 30 000008:[k#16,SET-n#19,SET] 31 000007:[a#14,SET-j#17,SET] 32 000006:[b#15,SET-d#15,SET] 33 000005:[i#8,SET-j#13,SET] 34 000004:[g#6,SET-h#12,SET] 35 000003:[e#2,SET-f#7,SET] 36 000002:[a#1,SET-b#5,SET] 37 000001:[c#3,SET-d#4,SET] 38 ---- 39 OK 40 41 # Add some ingested SSTables around the 14-19 seqnum cases. 42 check-ordering 43 0: 44 000010:[m#20,SET-n#20,SET] 45 000009:[k#16,SET-n#19,SET] 46 000008:[m#18,SET-n#18,SET] 47 000007:[a#14,SET-j#17,SET] 48 000006:[b#15,SET-d#15,SET] 49 000005:[i#8,SET-j#13,SET] 50 000004:[g#6,SET-h#12,SET] 51 000003:[e#2,SET-f#7,SET] 52 000002:[a#1,SET-b#5,SET] 53 000001:[c#3,SET-d#4,SET] 54 ---- 55 OK 56 57 # Coincident sequence numbers around sstables with overlapping sequence numbers 58 # are possible due to flush splitting, so this is acceptable. 59 check-ordering 60 0: 61 000010:[m#20,SET-n#20,SET] 62 000009:[k#16,SET-n#19,SET] 63 000008:[m#18,SET-n#18,SET] 64 000007:[a#15,SET-j#17,SET] 65 000006:[b#15,SET-d#15,SET] 66 000005:[i#8,SET-j#13,SET] 67 000004:[g#6,SET-h#12,SET] 68 000003:[e#2,SET-f#7,SET] 69 000002:[a#1,SET-b#5,SET] 70 000001:[c#3,SET-d#4,SET] 71 ---- 72 OK 73 74 # Ensure that sstables passed in a non-sorted order are detected. 75 check-ordering 76 0: 77 000002:[a#1,SET-b#2,SET] 78 000001:[a#3,SET-d#3,SET] 79 ---- 80 L0 files 000001 and 000002 are not properly ordered: <#3-#3> vs <#1-#2> 81 0.1: 82 000002:[a#1,SET-b#2,SET] points:[a#1,SET-b#2,SET] 83 0.0: 84 000001:[a#3,SET-d#3,SET] points:[a#3,SET-d#3,SET] 85 86 check-ordering 87 0: 88 000002:[a#3,SET-b#3,SET] 89 000001:[a#2,SET-d#4,SET] 90 ---- 91 L0 files 000001 and 000002 are not properly ordered: <#2-#4> vs <#3-#3> 92 0.1: 93 000002:[a#3,SET-b#3,SET] points:[a#3,SET-b#3,SET] 94 0.0: 95 000001:[a#2,SET-d#4,SET] points:[a#2,SET-d#4,SET] 96 97 check-ordering 98 0: 99 000002:[a#3,SET-b#3,SET] 100 000001:[a#3,SET-d#3,SET] 101 ---- 102 OK 103 104 check-ordering 105 0: 106 000002:[a#3,SET-d#5,SET] 107 000001:[a#3,SET-d#3,SET] 108 ---- 109 OK 110 111 check-ordering 112 0: 113 000002:[a#3,SET-d#5,SET] 114 000001:[a#4,SET-d#4,SET] 115 ---- 116 OK 117 118 check-ordering 119 0: 120 000002:[a#5,SET-d#5,SET] 121 000001:[a#3,SET-d#5,SET] 122 ---- 123 OK 124 125 check-ordering 126 0: 127 000003:[a#4,SET-d#6,SET] 128 000002:[a#5,SET-d#5,SET] 129 000001:[a#4,SET-d#4,SET] 130 ---- 131 OK 132 133 check-ordering 134 0: 135 000003:[a#0,SET-d#3,SET] 136 000002:[a#0,SET-d#0,SET] 137 000001:[a#0,SET-d#0,SET] 138 ---- 139 OK 140 141 check-ordering 142 1: 143 000001:[a#1,SET-b#2,SET] 144 ---- 145 OK 146 147 check-ordering 148 1: 149 000001:[b#1,SET-a#2,SET] 150 ---- 151 L1 : file 000001 has inconsistent bounds: b#1,SET vs a#2,SET 152 1: 153 000001:[b#1,SET-a#2,SET] points:[b#1,SET-a#2,SET] 154 155 check-ordering 156 1: 157 000001:[a#1,SET-b#2,SET] 158 000002:[c#3,SET-d#4,SET] 159 ---- 160 OK 161 162 check-ordering 163 1: 164 000001:[a#1,SET-b#2,SET] 165 000002:[d#3,SET-c#4,SET] 166 ---- 167 L1 : file 000002 has inconsistent bounds: d#3,SET vs c#4,SET 168 1: 169 000001:[a#1,SET-b#2,SET] points:[a#1,SET-b#2,SET] 170 000002:[d#3,SET-c#4,SET] points:[d#3,SET-c#4,SET] 171 172 check-ordering 173 1: 174 000001:[a#1,SET-b#2,SET] 175 000002:[b#1,SET-d#4,SET] 176 ---- 177 OK 178 179 check-ordering 180 1: 181 000001:[a#1,SET-b#2,SET] 182 000002:[b#2,SET-d#4,SET] 183 ---- 184 L1 files 000001 and 000002 have overlapping ranges: [a#1,SET-b#2,SET] vs [b#2,SET-d#4,SET] 185 1: 186 000001:[a#1,SET-b#2,SET] points:[a#1,SET-b#2,SET] 187 000002:[b#2,SET-d#4,SET] points:[b#2,SET-d#4,SET] 188 189 check-ordering 190 1: 191 000001:[a#1,SET-c#2,SET] 192 000002:[b#3,SET-d#4,SET] 193 ---- 194 L1 files 000001 and 000002 have overlapping ranges: [a#1,SET-c#2,SET] vs [b#3,SET-d#4,SET] 195 1: 196 000001:[a#1,SET-c#2,SET] points:[a#1,SET-c#2,SET] 197 000002:[b#3,SET-d#4,SET] points:[b#3,SET-d#4,SET] 198 199 check-ordering 200 1: 201 000001:[a#1,SET-c#2,SET] 202 2: 203 000002:[b#3,SET-d#4,SET] 204 ---- 205 OK 206 207 check-ordering 208 1: 209 000001:[a#1,SET-c#2,SET] 210 2: 211 000002:[b#3,SET-d#4,SET] 212 000003:[c#5,SET-e#6,SET] 213 ---- 214 L2 files 000002 and 000003 have overlapping ranges: [b#3,SET-d#4,SET] vs [c#5,SET-e#6,SET] 215 1: 216 000001:[a#1,SET-c#2,SET] points:[a#1,SET-c#2,SET] 217 2: 218 000002:[b#3,SET-d#4,SET] points:[b#3,SET-d#4,SET] 219 000003:[c#5,SET-e#6,SET] points:[c#5,SET-e#6,SET] 220 221 # Ordering considers tables with just range keys. 222 223 check-ordering 224 0: 225 000002:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 226 000001:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 227 ---- 228 OK 229 230 check-ordering 231 0: 232 000002:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 233 000001:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 234 ---- 235 L0 files 000001 and 000002 are not properly ordered: <#3-#72057594037927935> vs <#1-#72057594037927935> 236 0.0: 237 000001:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 238 000002:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 239 240 check-ordering 241 1: 242 000001:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 243 000002:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 244 ---- 245 OK 246 247 check-ordering 248 1: 249 000001:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 250 000002:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 251 ---- 252 L1 files 000001 and 000002 are not properly ordered: [c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] vs [a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 253 1: 254 000001:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 255 000002:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 256 257 # Ordering considers tables with both point and range keys. 258 259 check-ordering 260 0: 261 000002:[c#1,RANGEKEYSET-e#4,SET] points:[d#3,SET-e#4,SET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 262 000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 263 ---- 264 OK 265 266 check-ordering 267 0: 268 000002:[c#1,RANGEKEYSET-e#2,SET] points:[d#3,SET-e#2,SET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 269 000001:[a#1,RANGEKEYSET-c#4,SET] points:[b#1,SET-c#4,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 270 ---- 271 L0 files 000001 and 000002 are not properly ordered: <#1-#4> vs <#1-#2> 272 0.1: 273 000002:[c#1,RANGEKEYSET-e#2,SET] points:[d#3,SET-e#2,SET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] 274 0.0: 275 000001:[a#1,RANGEKEYSET-c#4,SET] points:[b#1,SET-c#4,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 276 277 check-ordering 278 1: 279 000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 280 000002:[d#3,RANGEKEYSET-f#4,SET] points:[e#3,SET-f#4,SET] ranges:[d#3,RANGEKEYSET-e#72057594037927935,RANGEKEYSET] 281 ---- 282 OK 283 284 check-ordering 285 1: 286 000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 287 000002:[c#3,RANGEKEYSET-f#4,SET] points:[e#3,SET-f#4,SET] ranges:[c#3,RANGEKEYSET-e#72057594037927935,RANGEKEYSET] 288 ---- 289 L1 files 000001 and 000002 have overlapping ranges: [a#1,RANGEKEYSET-c#2,SET] vs [c#3,RANGEKEYSET-f#4,SET] 290 1: 291 000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] 292 000002:[c#3,RANGEKEYSET-f#4,SET] points:[e#3,SET-f#4,SET] ranges:[c#3,RANGEKEYSET-e#72057594037927935,RANGEKEYSET]