github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/testdata/range_del (about) 1 # 1 memtable. 2 3 define 4 mem 5 a.SET.10:b 6 a.SET.12:c 7 a.SET.14:d 8 b.MERGE.10:b 9 b.MERGE.12:c 10 b.MERGE.14:d 11 b.RANGEDEL.15:c 12 b.MERGE.16:e 13 c.SET.10:b 14 c.SET.12:c 15 c.SET.14:d 16 ---- 17 mem: 1 18 19 get seq=11 20 a 21 b 22 c 23 ---- 24 a:b 25 b:b 26 c:b 27 28 get seq=13 29 a 30 b 31 c 32 ---- 33 a:c 34 b:bc 35 c:c 36 37 get seq=15 38 a 39 b 40 c 41 ---- 42 a:d 43 b:bcd 44 c:d 45 46 get seq=16 47 a 48 b 49 c 50 ---- 51 a:d 52 b: pebble: not found 53 c:d 54 55 get seq=17 56 a 57 b 58 c 59 ---- 60 a:d 61 b:e 62 c:d 63 64 get seq=15 65 a 66 b 67 c 68 ---- 69 a:d 70 b:bcd 71 c:d 72 73 iter seq=15 74 first 75 next 76 next 77 next 78 seek-ge a 79 seek-ge b 80 seek-ge c 81 seek-ge d 82 last 83 prev 84 prev 85 prev 86 seek-lt a 87 seek-lt b 88 seek-lt c 89 seek-lt d 90 ---- 91 a: (d, .) 92 b: (bcd, .) 93 c: (d, .) 94 . 95 a: (d, .) 96 b: (bcd, .) 97 c: (d, .) 98 . 99 c: (d, .) 100 b: (bcd, .) 101 a: (d, .) 102 . 103 . 104 a: (d, .) 105 b: (bcd, .) 106 c: (d, .) 107 108 iter seq=16 109 first 110 next 111 next 112 seek-ge a 113 seek-ge b 114 seek-ge c 115 seek-ge d 116 last 117 prev 118 prev 119 seek-lt a 120 seek-lt b 121 seek-lt c 122 seek-lt d 123 ---- 124 a: (d, .) 125 c: (d, .) 126 . 127 a: (d, .) 128 c: (d, .) 129 c: (d, .) 130 . 131 c: (d, .) 132 a: (d, .) 133 . 134 . 135 a: (d, .) 136 a: (d, .) 137 c: (d, .) 138 139 # Multiple memtables. 140 141 define 142 mem 143 a.SET.10:b 144 b.MERGE.10:b 145 c.SET.10:b 146 mem 147 a.SET.12:c 148 b.MERGE.12:c 149 c.SET.12:c 150 mem 151 a.SET.14:d 152 b.MERGE.14:d 153 c.SET.14:d 154 mem 155 b.RANGEDEL.15:c 156 mem 157 b.MERGE.16:e 158 ---- 159 mem: 5 160 161 get seq=11 162 a 163 b 164 c 165 ---- 166 a:b 167 b:b 168 c:b 169 170 get seq=13 171 a 172 b 173 c 174 ---- 175 a:c 176 b:bc 177 c:c 178 179 get seq=15 180 a 181 b 182 c 183 ---- 184 a:d 185 b:bcd 186 c:d 187 188 get seq=16 189 a 190 b 191 c 192 ---- 193 a:d 194 b: pebble: not found 195 c:d 196 197 get seq=17 198 a 199 b 200 c 201 ---- 202 a:d 203 b:e 204 c:d 205 206 get seq=15 207 a 208 b 209 c 210 ---- 211 a:d 212 b:bcd 213 c:d 214 215 iter seq=15 216 first 217 next 218 next 219 next 220 seek-ge a 221 seek-ge b 222 seek-ge c 223 seek-ge d 224 last 225 prev 226 prev 227 prev 228 seek-lt a 229 seek-lt b 230 seek-lt c 231 seek-lt d 232 ---- 233 a: (d, .) 234 b: (bcd, .) 235 c: (d, .) 236 . 237 a: (d, .) 238 b: (bcd, .) 239 c: (d, .) 240 . 241 c: (d, .) 242 b: (bcd, .) 243 a: (d, .) 244 . 245 . 246 a: (d, .) 247 b: (bcd, .) 248 c: (d, .) 249 250 iter seq=16 251 first 252 next 253 next 254 seek-ge a 255 seek-ge b 256 seek-ge c 257 seek-ge d 258 last 259 prev 260 prev 261 seek-lt a 262 seek-lt b 263 seek-lt c 264 seek-lt d 265 ---- 266 a: (d, .) 267 c: (d, .) 268 . 269 a: (d, .) 270 c: (d, .) 271 c: (d, .) 272 . 273 c: (d, .) 274 a: (d, .) 275 . 276 . 277 a: (d, .) 278 a: (d, .) 279 c: (d, .) 280 281 # Overlapping range deletions in the same memtable. 282 283 define 284 mem 285 a.SET.10:1 286 a.SET.12:2 287 a.SET.14:3 288 a.SET.16:4 289 b.SET.10:1 290 b.SET.12:2 291 b.SET.14:3 292 b.SET.16:4 293 c.SET.10:1 294 c.SET.12:2 295 c.SET.14:3 296 c.SET.16:4 297 d.SET.10:1 298 d.SET.12:2 299 d.SET.14:3 300 d.SET.16:4 301 a.RANGEDEL.11:b 302 b.RANGEDEL.13:c 303 b.RANGEDEL.11:c 304 c.RANGEDEL.15:d 305 c.RANGEDEL.13:d 306 c.RANGEDEL.11:d 307 ---- 308 mem: 1 309 310 get seq=11 311 a 312 b 313 c 314 d 315 ---- 316 a:1 317 b:1 318 c:1 319 d:1 320 321 get seq=12 322 a 323 b 324 c 325 d 326 ---- 327 a: pebble: not found 328 b: pebble: not found 329 c: pebble: not found 330 d:1 331 332 get seq=14 333 a 334 b 335 c 336 d 337 ---- 338 a:2 339 b: pebble: not found 340 c: pebble: not found 341 d:2 342 343 get seq=16 344 a 345 b 346 c 347 d 348 ---- 349 a:3 350 b:3 351 c: pebble: not found 352 d:3 353 354 get seq=18 355 a 356 b 357 c 358 d 359 ---- 360 a:4 361 b:4 362 c:4 363 d:4 364 365 iter seq=11 366 first 367 next 368 next 369 next 370 next 371 last 372 prev 373 prev 374 prev 375 prev 376 ---- 377 a: (1, .) 378 b: (1, .) 379 c: (1, .) 380 d: (1, .) 381 . 382 d: (1, .) 383 c: (1, .) 384 b: (1, .) 385 a: (1, .) 386 . 387 388 iter seq=12 389 first 390 next 391 last 392 prev 393 ---- 394 d: (1, .) 395 . 396 d: (1, .) 397 . 398 399 iter seq=14 400 first 401 next 402 next 403 last 404 prev 405 prev 406 ---- 407 a: (2, .) 408 d: (2, .) 409 . 410 d: (2, .) 411 a: (2, .) 412 . 413 414 iter seq=16 415 first 416 next 417 next 418 next 419 last 420 prev 421 prev 422 prev 423 ---- 424 a: (3, .) 425 b: (3, .) 426 d: (3, .) 427 . 428 d: (3, .) 429 b: (3, .) 430 a: (3, .) 431 . 432 433 iter seq=18 434 first 435 next 436 next 437 next 438 next 439 last 440 prev 441 prev 442 prev 443 prev 444 ---- 445 a: (4, .) 446 b: (4, .) 447 c: (4, .) 448 d: (4, .) 449 . 450 d: (4, .) 451 c: (4, .) 452 b: (4, .) 453 a: (4, .) 454 . 455 456 # Overlapping range deletions in different memtables. Note that the 457 # range tombstones are not fragmented in this case. 458 459 define 460 mem 461 a.SET.10:1 462 b.SET.10:1 463 c.SET.10:1 464 d.SET.10:1 465 mem 466 a.SET.12:2 467 b.SET.12:2 468 c.SET.12:2 469 d.SET.12:2 470 a.RANGEDEL.11:d 471 mem 472 a.SET.14:3 473 b.SET.14:3 474 c.SET.14:3 475 d.SET.14:3 476 b.RANGEDEL.13:d 477 mem 478 a.SET.16:4 479 b.SET.16:4 480 c.SET.16:4 481 d.SET.16:4 482 c.RANGEDEL.13:d 483 ---- 484 mem: 4 485 486 get seq=11 487 a 488 b 489 c 490 d 491 ---- 492 a:1 493 b:1 494 c:1 495 d:1 496 497 get seq=12 498 a 499 b 500 c 501 d 502 ---- 503 a: pebble: not found 504 b: pebble: not found 505 c: pebble: not found 506 d:1 507 508 get seq=14 509 a 510 b 511 c 512 d 513 ---- 514 a:2 515 b: pebble: not found 516 c: pebble: not found 517 d:2 518 519 get seq=16 520 a 521 b 522 c 523 d 524 ---- 525 a:3 526 b:3 527 c: pebble: not found 528 d:3 529 530 get seq=18 531 a 532 b 533 c 534 d 535 ---- 536 a:4 537 b:4 538 c:4 539 d:4 540 541 iter seq=11 542 first 543 next 544 next 545 next 546 next 547 last 548 prev 549 prev 550 prev 551 prev 552 ---- 553 a: (1, .) 554 b: (1, .) 555 c: (1, .) 556 d: (1, .) 557 . 558 d: (1, .) 559 c: (1, .) 560 b: (1, .) 561 a: (1, .) 562 . 563 564 iter seq=12 565 first 566 next 567 last 568 prev 569 ---- 570 d: (1, .) 571 . 572 d: (1, .) 573 . 574 575 iter seq=14 576 first 577 next 578 next 579 last 580 prev 581 prev 582 ---- 583 a: (2, .) 584 d: (2, .) 585 . 586 d: (2, .) 587 a: (2, .) 588 . 589 590 iter seq=16 591 first 592 next 593 next 594 next 595 last 596 prev 597 prev 598 prev 599 ---- 600 a: (3, .) 601 b: (3, .) 602 d: (3, .) 603 . 604 d: (3, .) 605 b: (3, .) 606 a: (3, .) 607 . 608 609 iter seq=18 610 first 611 next 612 next 613 next 614 next 615 last 616 prev 617 prev 618 prev 619 prev 620 ---- 621 a: (4, .) 622 b: (4, .) 623 c: (4, .) 624 d: (4, .) 625 . 626 d: (4, .) 627 c: (4, .) 628 b: (4, .) 629 a: (4, .) 630 . 631 632 # User-key that spans tables in a level. 633 634 define 635 L1 636 a.SET.12:3 637 L1 638 a.SET.11:2 639 L1 640 a.SET.10:1 641 ---- 642 mem: 1 643 1: 644 000004:[a#12,SET-a#12,SET] 645 000005:[a#11,SET-a#11,SET] 646 000006:[a#10,SET-a#10,SET] 647 648 get seq=10 649 a 650 ---- 651 a: pebble: not found 652 653 get seq=11 654 a 655 ---- 656 a:1 657 658 get seq=12 659 a 660 ---- 661 a:2 662 663 get seq=13 664 a 665 ---- 666 a:3 667 668 iter seq=11 669 first 670 seek-ge a 671 seek-ge b 672 last 673 seek-lt a 674 seek-lt b 675 ---- 676 a: (1, .) 677 a: (1, .) 678 . 679 a: (1, .) 680 . 681 a: (1, .) 682 683 iter seq=12 684 first 685 seek-ge a 686 seek-ge b 687 last 688 seek-lt a 689 seek-lt b 690 ---- 691 a: (2, .) 692 a: (2, .) 693 . 694 a: (2, .) 695 . 696 a: (2, .) 697 698 iter seq=13 699 first 700 seek-ge a 701 seek-ge b 702 last 703 seek-lt a 704 seek-lt b 705 ---- 706 a: (3, .) 707 a: (3, .) 708 . 709 a: (3, .) 710 . 711 a: (3, .) 712 713 define 714 L1 715 a.MERGE.12:3 716 L1 717 a.MERGE.11:2 718 L1 719 a.MERGE.10:1 720 ---- 721 mem: 1 722 1: 723 000004:[a#12,MERGE-a#12,MERGE] 724 000005:[a#11,MERGE-a#11,MERGE] 725 000006:[a#10,MERGE-a#10,MERGE] 726 727 get seq=10 728 a 729 ---- 730 a: pebble: not found 731 732 get seq=11 733 a 734 ---- 735 a:1 736 737 get seq=12 738 a 739 ---- 740 a:12 741 742 get seq=13 743 a 744 ---- 745 a:123 746 747 iter seq=11 748 first 749 seek-ge a 750 seek-ge b 751 last 752 seek-lt a 753 seek-lt b 754 ---- 755 a: (1, .) 756 a: (1, .) 757 . 758 a: (1, .) 759 . 760 a: (1, .) 761 762 iter seq=12 763 first 764 seek-ge a 765 seek-ge b 766 last 767 seek-lt a 768 seek-lt b 769 ---- 770 a: (12, .) 771 a: (12, .) 772 . 773 a: (12, .) 774 . 775 a: (12, .) 776 777 iter seq=13 778 first 779 seek-ge a 780 seek-ge b 781 last 782 seek-lt a 783 seek-lt b 784 ---- 785 a: (123, .) 786 a: (123, .) 787 . 788 a: (123, .) 789 . 790 a: (123, .) 791 792 # User-key spread across multiple levels. 793 794 define 795 mem 796 a.MERGE.13:4 797 L1 798 a.MERGE.12:3 799 L2 800 a.MERGE.11:2 801 L3 802 a.MERGE.10:1 803 ---- 804 mem: 1 805 1: 806 000004:[a#12,MERGE-a#12,MERGE] 807 2: 808 000005:[a#11,MERGE-a#11,MERGE] 809 3: 810 000006:[a#10,MERGE-a#10,MERGE] 811 812 get seq=10 813 a 814 ---- 815 a: pebble: not found 816 817 get seq=11 818 a 819 ---- 820 a:1 821 822 get seq=12 823 a 824 ---- 825 a:12 826 827 get seq=13 828 a 829 ---- 830 a:123 831 832 get seq=14 833 a 834 ---- 835 a:1234 836 837 iter seq=11 838 first 839 seek-ge a 840 seek-ge b 841 last 842 seek-lt a 843 seek-lt b 844 ---- 845 a: (1, .) 846 a: (1, .) 847 . 848 a: (1, .) 849 . 850 a: (1, .) 851 852 iter seq=12 853 first 854 seek-ge a 855 seek-ge b 856 last 857 seek-lt a 858 seek-lt b 859 ---- 860 a: (12, .) 861 a: (12, .) 862 . 863 a: (12, .) 864 . 865 a: (12, .) 866 867 iter seq=13 868 first 869 seek-ge a 870 seek-ge b 871 last 872 seek-lt a 873 seek-lt b 874 ---- 875 a: (123, .) 876 a: (123, .) 877 . 878 a: (123, .) 879 . 880 a: (123, .) 881 882 iter seq=14 883 first 884 seek-ge a 885 seek-ge b 886 last 887 seek-lt a 888 seek-lt b 889 ---- 890 a: (1234, .) 891 a: (1234, .) 892 . 893 a: (1234, .) 894 . 895 a: (1234, .) 896 897 # Range deletions on multiple levels. 898 define 899 L0 900 a.SET.13:4 901 b.SET.13:4 902 d.SET.13:4 903 c.RANGEDEL.13:d 904 L1 905 a.SET.12:3 906 d.SET.12:3 907 b.RANGEDEL.12:d 908 L2 909 d.SET.11:2 910 a.RANGEDEL.11:d 911 L3 912 a.SET.10:1 913 b.SET.10:1 914 c.SET.10:1 915 d.SET.10:1 916 ---- 917 mem: 1 918 0.0: 919 000004:[a#13,SET-d#13,SET] 920 1: 921 000005:[a#12,SET-d#12,SET] 922 2: 923 000006:[a#11,RANGEDEL-d#11,SET] 924 3: 925 000007:[a#10,SET-d#10,SET] 926 927 get seq=11 928 a 929 b 930 c 931 d 932 ---- 933 a:1 934 b:1 935 c:1 936 d:1 937 938 get seq=12 939 a 940 b 941 c 942 d 943 ---- 944 a: pebble: not found 945 b: pebble: not found 946 c: pebble: not found 947 d:2 948 949 get seq=13 950 a 951 b 952 c 953 d 954 ---- 955 a:3 956 b: pebble: not found 957 c: pebble: not found 958 d:3 959 960 get seq=14 961 a 962 b 963 c 964 d 965 ---- 966 a:4 967 b:4 968 c: pebble: not found 969 d:4 970 971 iter seq=11 972 first 973 next 974 next 975 next 976 last 977 prev 978 prev 979 prev 980 ---- 981 a: (1, .) 982 b: (1, .) 983 c: (1, .) 984 d: (1, .) 985 d: (1, .) 986 c: (1, .) 987 b: (1, .) 988 a: (1, .) 989 990 iter seq=12 991 first 992 last 993 ---- 994 d: (2, .) 995 d: (2, .) 996 997 iter seq=13 998 first 999 next 1000 last 1001 prev 1002 ---- 1003 a: (3, .) 1004 d: (3, .) 1005 d: (3, .) 1006 a: (3, .) 1007 1008 iter seq=14 1009 first 1010 next 1011 next 1012 last 1013 prev 1014 prev 1015 ---- 1016 a: (4, .) 1017 b: (4, .) 1018 d: (4, .) 1019 d: (4, .) 1020 b: (4, .) 1021 a: (4, .) 1022 1023 # Range deletions spanning tables within a level. 1024 1025 define 1026 mem 1027 a.SET.12:3 1028 b.SET.12:3 1029 c.SET.12:3 1030 d.SET.12:3 1031 L1 1032 a.RANGEDEL.11:b 1033 L1 1034 b.RANGEDEL.11:c 1035 L1 1036 c.RANGEDEL.11:d 1037 L2 1038 a.SET.10:1 1039 b.SET.10:1 1040 c.SET.10:1 1041 d.SET.10:1 1042 ---- 1043 mem: 1 1044 1: 1045 000004:[a#11,RANGEDEL-b#inf,RANGEDEL] 1046 000005:[b#11,RANGEDEL-c#inf,RANGEDEL] 1047 000006:[c#11,RANGEDEL-d#inf,RANGEDEL] 1048 2: 1049 000007:[a#10,SET-d#10,SET] 1050 1051 get seq=11 1052 a 1053 b 1054 c 1055 d 1056 ---- 1057 a:1 1058 b:1 1059 c:1 1060 d:1 1061 1062 get seq=12 1063 a 1064 b 1065 c 1066 d 1067 ---- 1068 a: pebble: not found 1069 b: pebble: not found 1070 c: pebble: not found 1071 d:1 1072 1073 get seq=13 1074 a 1075 b 1076 c 1077 d 1078 ---- 1079 a:3 1080 b:3 1081 c:3 1082 d:3 1083 1084 iter seq=11 1085 first 1086 next 1087 next 1088 next 1089 last 1090 prev 1091 prev 1092 prev 1093 ---- 1094 a: (1, .) 1095 b: (1, .) 1096 c: (1, .) 1097 d: (1, .) 1098 d: (1, .) 1099 c: (1, .) 1100 b: (1, .) 1101 a: (1, .) 1102 1103 iter seq=12 1104 first 1105 last 1106 ---- 1107 d: (1, .) 1108 d: (1, .) 1109 1110 iter seq=13 1111 first 1112 next 1113 next 1114 next 1115 last 1116 prev 1117 prev 1118 prev 1119 ---- 1120 a: (3, .) 1121 b: (3, .) 1122 c: (3, .) 1123 d: (3, .) 1124 d: (3, .) 1125 c: (3, .) 1126 b: (3, .) 1127 a: (3, .) 1128 1129 # Invalid LSM structure (range deletion at newer level covers newer 1130 # write at an older level). This LSM structure is not generated 1131 # naturally, but tested here to show the level-by-level nature of Get. 1132 1133 define 1134 L1 1135 a.RANGEDEL.10:b 1136 L2 1137 a.SET.11:2 1138 ---- 1139 mem: 1 1140 1: 1141 000004:[a#10,RANGEDEL-b#inf,RANGEDEL] 1142 2: 1143 000005:[a#11,SET-a#11,SET] 1144 1145 get seq=12 1146 a 1147 ---- 1148 a: pebble: not found 1149 1150 # A range tombstone straddles two SSTs. One is compacted to a lower level. Its 1151 # keys that are newer than the range tombstone should not disappear. 1152 # 1153 # Uses a snapshot to prevent range tombstone from being elided when it gets 1154 # compacted to the bottommost level. 1155 1156 define target-file-sizes=(100, 1) snapshots=(1) 1157 L0 1158 a.RANGEDEL.10:e 1159 L0 1160 a.SET.11:v 1161 L0 1162 c.SET.12:v 1163 ---- 1164 mem: 1 1165 0.1: 1166 000005:[a#11,SET-a#11,SET] 1167 000006:[c#12,SET-c#12,SET] 1168 0.0: 1169 000004:[a#10,RANGEDEL-e#inf,RANGEDEL] 1170 1171 compact a-e 1172 ---- 1173 1: 1174 000007:[a#11,SET-c#inf,RANGEDEL] 1175 000008:[c#12,SET-e#inf,RANGEDEL] 1176 1177 compact d-e 1178 ---- 1179 1: 1180 000007:[a#11,SET-c#inf,RANGEDEL] 1181 2: 1182 000008:[c#12,SET-e#inf,RANGEDEL] 1183 1184 iter seq=13 1185 seek-ge b 1186 next 1187 ---- 1188 c: (v, .) 1189 . 1190 1191 # Reverse the above test: compact the left file containing the split range 1192 # tombstone downwards, and iterate from right to left. 1193 1194 define target-file-sizes=(100, 1) snapshots=(1) 1195 L0 1196 a.RANGEDEL.10:e 1197 L0 1198 a.SET.11:v 1199 L0 1200 c.SET.12:v 1201 ---- 1202 mem: 1 1203 0.1: 1204 000005:[a#11,SET-a#11,SET] 1205 000006:[c#12,SET-c#12,SET] 1206 0.0: 1207 000004:[a#10,RANGEDEL-e#inf,RANGEDEL] 1208 1209 compact a-e 1210 ---- 1211 1: 1212 000007:[a#11,SET-c#inf,RANGEDEL] 1213 000008:[c#12,SET-e#inf,RANGEDEL] 1214 1215 compact a-b 1216 ---- 1217 1: 1218 000008:[c#12,SET-e#inf,RANGEDEL] 1219 2: 1220 000007:[a#11,SET-c#inf,RANGEDEL] 1221 1222 iter seq=13 1223 seek-lt d 1224 prev 1225 prev 1226 ---- 1227 c: (v, .) 1228 a: (v, .) 1229 . 1230 1231 # A range tombstone straddles two sstables. One is compacted two 1232 # levels lower. The other is compacted one level lower. The one that 1233 # is compacted one level lower should not see its boundaries expand 1234 # causing it to delete more keys. A snapshot is used to prevent range 1235 # tombstone from being elided when it gets compacted to the bottommost 1236 # level. 1237 1238 define target-file-sizes=(100, 1) snapshots=(1) 1239 L0 1240 a.RANGEDEL.10:e 1241 L0 1242 a.SET.11:v 1243 L0 1244 c.SET.12:v 1245 L2 1246 d.SET.0:v 1247 ---- 1248 mem: 1 1249 0.1: 1250 000005:[a#11,SET-a#11,SET] 1251 000006:[c#12,SET-c#12,SET] 1252 0.0: 1253 000004:[a#10,RANGEDEL-e#inf,RANGEDEL] 1254 2: 1255 000007:[d#0,SET-d#0,SET] 1256 1257 compact a-b 1258 ---- 1259 1: 1260 000008:[a#11,SET-c#inf,RANGEDEL] 1261 000009:[c#12,SET-d#inf,RANGEDEL] 1262 000010:[d#10,RANGEDEL-e#inf,RANGEDEL] 1263 2: 1264 000007:[d#0,SET-d#0,SET] 1265 1266 compact d-e 1267 ---- 1268 1: 1269 000008:[a#11,SET-c#inf,RANGEDEL] 1270 000009:[c#12,SET-d#inf,RANGEDEL] 1271 3: 1272 000011:[d#10,RANGEDEL-e#inf,RANGEDEL] 1273 1274 get seq=13 1275 c 1276 ---- 1277 c:v 1278 1279 compact a-b L1 1280 ---- 1281 1: 1282 000009:[c#12,SET-d#inf,RANGEDEL] 1283 2: 1284 000008:[a#11,SET-c#inf,RANGEDEL] 1285 3: 1286 000011:[d#10,RANGEDEL-e#inf,RANGEDEL] 1287 1288 get seq=13 1289 c 1290 ---- 1291 c:v 1292 1293 # A slight variation on the scenario above where a range tombstone is 1294 # expanded past the boundaries of its "atomic compaction unit". 1295 1296 define target-file-sizes=(100, 1) snapshots=(1) 1297 L0 1298 a.RANGEDEL.10:e 1299 L0 1300 a.SET.11:v 1301 L0 1302 c.SET.12:v 1303 L0 1304 f.SET.13:v 1305 L2 1306 d.SET.0:v 1307 ---- 1308 mem: 1 1309 0.1: 1310 000005:[a#11,SET-a#11,SET] 1311 000006:[c#12,SET-c#12,SET] 1312 0.0: 1313 000004:[a#10,RANGEDEL-e#inf,RANGEDEL] 1314 000007:[f#13,SET-f#13,SET] 1315 2: 1316 000008:[d#0,SET-d#0,SET] 1317 1318 compact a-b 1319 ---- 1320 0.0: 1321 000007:[f#13,SET-f#13,SET] 1322 1: 1323 000009:[a#11,SET-c#inf,RANGEDEL] 1324 000010:[c#12,SET-d#inf,RANGEDEL] 1325 000011:[d#10,RANGEDEL-e#inf,RANGEDEL] 1326 2: 1327 000008:[d#0,SET-d#0,SET] 1328 1329 compact d-e 1330 ---- 1331 0.0: 1332 000007:[f#13,SET-f#13,SET] 1333 1: 1334 000009:[a#11,SET-c#inf,RANGEDEL] 1335 000010:[c#12,SET-d#inf,RANGEDEL] 1336 3: 1337 000012:[d#10,RANGEDEL-e#inf,RANGEDEL] 1338 1339 get seq=13 1340 c 1341 ---- 1342 c:v 1343 1344 compact f-f L0 1345 ---- 1346 1: 1347 000009:[a#11,SET-c#inf,RANGEDEL] 1348 000010:[c#12,SET-d#inf,RANGEDEL] 1349 000007:[f#13,SET-f#13,SET] 1350 3: 1351 000012:[d#10,RANGEDEL-e#inf,RANGEDEL] 1352 1353 compact a-f L1 1354 ---- 1355 2: 1356 000013:[a#11,SET-c#inf,RANGEDEL] 1357 000014:[c#12,SET-d#inf,RANGEDEL] 1358 000015:[f#13,SET-f#13,SET] 1359 3: 1360 000012:[d#10,RANGEDEL-e#inf,RANGEDEL] 1361 1362 get seq=13 1363 c 1364 ---- 1365 c:v 1366 1367 define 1368 L0 1369 a.RANGEDEL.12:f 1370 L0 1371 a.RANGEDEL.13:c 1372 c.RANGEDEL.13:f 1373 L1 1374 b.RANGEDEL.11:e 1375 L2 1376 c.RANGEDEL.10:d 1377 ---- 1378 mem: 1 1379 0.1: 1380 000005:[a#13,RANGEDEL-f#inf,RANGEDEL] 1381 0.0: 1382 000004:[a#12,RANGEDEL-f#inf,RANGEDEL] 1383 1: 1384 000006:[b#11,RANGEDEL-e#inf,RANGEDEL] 1385 2: 1386 000007:[c#10,RANGEDEL-d#inf,RANGEDEL] 1387 1388 wait-pending-table-stats 1389 000007 1390 ---- 1391 num-entries: 1 1392 num-deletions: 1 1393 num-range-key-sets: 0 1394 point-deletions-bytes-estimate: 0 1395 range-deletions-bytes-estimate: 0 1396 1397 wait-pending-table-stats 1398 000006 1399 ---- 1400 num-entries: 1 1401 num-deletions: 1 1402 num-range-key-sets: 0 1403 point-deletions-bytes-estimate: 0 1404 range-deletions-bytes-estimate: 836 1405 1406 wait-pending-table-stats 1407 000004 1408 ---- 1409 num-entries: 1 1410 num-deletions: 1 1411 num-range-key-sets: 0 1412 point-deletions-bytes-estimate: 0 1413 range-deletions-bytes-estimate: 1672 1414 1415 wait-pending-table-stats 1416 000005 1417 ---- 1418 num-entries: 2 1419 num-deletions: 2 1420 num-range-key-sets: 0 1421 point-deletions-bytes-estimate: 0 1422 range-deletions-bytes-estimate: 1672 1423 1424 1425 # Range deletions with varying overlap. 1426 define 1427 L0 1428 a.SET.13:4 1429 b.SET.13:4 1430 d.SET.13:4 1431 c.RANGEDEL.13:d 1432 L1 1433 a.SET.12:3 1434 d.SET.12:3 1435 b.RANGEDEL.12:d 1436 L2 1437 d.SET.11:2 1438 a.RANGEDEL.11:d 1439 L3 1440 a.SET.10:1 1441 b.SET.10:1 1442 c.SET.10:1 1443 d.SET.10:1 1444 ---- 1445 mem: 1 1446 0.0: 1447 000004:[a#13,SET-d#13,SET] 1448 1: 1449 000005:[a#12,SET-d#12,SET] 1450 2: 1451 000006:[a#11,RANGEDEL-d#11,SET] 1452 3: 1453 000007:[a#10,SET-d#10,SET] 1454 1455 wait-pending-table-stats 1456 000007 1457 ---- 1458 num-entries: 4 1459 num-deletions: 0 1460 num-range-key-sets: 0 1461 point-deletions-bytes-estimate: 0 1462 range-deletions-bytes-estimate: 0 1463 1464 wait-pending-table-stats 1465 000006 1466 ---- 1467 num-entries: 2 1468 num-deletions: 1 1469 num-range-key-sets: 0 1470 point-deletions-bytes-estimate: 0 1471 range-deletions-bytes-estimate: 42 1472 1473 wait-pending-table-stats 1474 000005 1475 ---- 1476 num-entries: 3 1477 num-deletions: 1 1478 num-range-key-sets: 0 1479 point-deletions-bytes-estimate: 0 1480 range-deletions-bytes-estimate: 68 1481 1482 wait-pending-table-stats 1483 000004 1484 ---- 1485 num-entries: 4 1486 num-deletions: 1 1487 num-range-key-sets: 0 1488 point-deletions-bytes-estimate: 0 1489 range-deletions-bytes-estimate: 100 1490 1491 # Multiple Range deletions in a table. 1492 define 1493 L0 1494 a.RANGEDEL.15:d 1495 e.RANGEDEL.15:z 1496 L0 1497 a.RANGEDEL.14:d 1498 L0 1499 e.RANGEDEL.13:z 1500 L1 1501 a.SET.11:1 1502 b.SET.11:1 1503 c.SET.11:1 1504 L2 1505 x.SET.10:2 1506 ---- 1507 mem: 1 1508 0.1: 1509 000004:[a#15,RANGEDEL-z#inf,RANGEDEL] 1510 0.0: 1511 000005:[a#14,RANGEDEL-d#inf,RANGEDEL] 1512 000006:[e#13,RANGEDEL-z#inf,RANGEDEL] 1513 1: 1514 000007:[a#11,SET-c#11,SET] 1515 2: 1516 000008:[x#10,SET-x#10,SET] 1517 1518 wait-pending-table-stats 1519 000005 1520 ---- 1521 num-entries: 1 1522 num-deletions: 1 1523 num-range-key-sets: 0 1524 point-deletions-bytes-estimate: 0 1525 range-deletions-bytes-estimate: 782 1526 1527 wait-pending-table-stats 1528 000006 1529 ---- 1530 num-entries: 1 1531 num-deletions: 1 1532 num-range-key-sets: 0 1533 point-deletions-bytes-estimate: 0 1534 range-deletions-bytes-estimate: 771 1535 1536 wait-pending-table-stats 1537 000004 1538 ---- 1539 num-entries: 2 1540 num-deletions: 2 1541 num-range-key-sets: 0 1542 point-deletions-bytes-estimate: 0 1543 range-deletions-bytes-estimate: 1553