github.com/cockroachdb/pebble@v1.1.1-0.20240513155919-3622ade60459/testdata/manual_compaction_set_with_del (about)

     1  batch
     2  set a 1
     3  set b 2
     4  ----
     5  
     6  compact a-b
     7  ----
     8  6:
     9    000005:[a#10,SET-b#11,SET]
    10  
    11  batch
    12  set c 3
    13  set d 4
    14  ----
    15  
    16  compact c-d
    17  ----
    18  6:
    19    000005:[a#10,SET-b#11,SET]
    20    000007:[c#12,SET-d#13,SET]
    21  
    22  batch
    23  set b 5
    24  set c 6
    25  ----
    26  
    27  compact a-d
    28  ----
    29  6:
    30    000010:[a#0,SET-d#0,SET]
    31  
    32  # This also tests flushing a memtable that only contains range
    33  # deletions.
    34  
    35  batch
    36  del-range a e
    37  ----
    38  
    39  compact a-d
    40  ----
    41  
    42  # Test that a multi-output-file compaction generates non-overlapping files.
    43  
    44  define target-file-sizes=(100, 1)
    45  L0
    46    b.SET.1:v
    47  L0
    48    a.SET.2:v
    49  ----
    50  0.0:
    51    000005:[a#2,SET-a#2,SET]
    52    000004:[b#1,SET-b#1,SET]
    53  
    54  compact a-b
    55  ----
    56  1:
    57    000006:[a#0,SET-a#0,SET]
    58    000007:[b#0,SET-b#0,SET]
    59  
    60  # A range tombstone extends past the grandparent file boundary used to limit the
    61  # size of future compactions. Verify the range tombstone is split at that file
    62  # boundary.
    63  
    64  define target-file-sizes=(1, 1, 1, 1)
    65  L1
    66    a.SET.3:v
    67  L2
    68    a.RANGEDEL.2:e
    69  L3
    70    a.SET.0:v
    71    b.SET.0:v
    72  L3
    73    c.SET.0:v
    74    d.SET.0:v
    75  ----
    76  1:
    77    000004:[a#3,SET-a#3,SET]
    78  2:
    79    000005:[a#2,RANGEDEL-e#inf,RANGEDEL]
    80  3:
    81    000006:[a#0,SET-b#0,SET]
    82    000007:[c#0,SET-d#0,SET]
    83  
    84  wait-pending-table-stats
    85  000005
    86  ----
    87  num-entries: 1
    88  num-deletions: 1
    89  num-range-key-sets: 0
    90  point-deletions-bytes-estimate: 0
    91  range-deletions-bytes-estimate: 1278
    92  
    93  compact a-e L1
    94  ----
    95  2:
    96    000008:[a#3,SETWITHDEL-c#inf,RANGEDEL]
    97    000009:[c#2,RANGEDEL-e#inf,RANGEDEL]
    98  3:
    99    000006:[a#0,SET-b#0,SET]
   100    000007:[c#0,SET-d#0,SET]
   101  
   102  wait-pending-table-stats
   103  000008
   104  ----
   105  num-entries: 2
   106  num-deletions: 1
   107  num-range-key-sets: 0
   108  point-deletions-bytes-estimate: 0
   109  range-deletions-bytes-estimate: 639
   110  
   111  # Same as above, except range tombstone covers multiple grandparent file boundaries.
   112  
   113  define target-file-sizes=(1, 1, 1, 1)
   114  L1
   115    a.SET.3:v
   116  L2
   117    a.RANGEDEL.2:g
   118  L3
   119    a.SET.0:v
   120    b.SET.0:v
   121  L3
   122    c.SET.0:v
   123    d.SET.0:v
   124  L3
   125    e.SET.0:v
   126    f.SET.1:v
   127  L3
   128    f.SET.0:v
   129    g.SET.0:v
   130  ----
   131  1:
   132    000004:[a#3,SET-a#3,SET]
   133  2:
   134    000005:[a#2,RANGEDEL-g#inf,RANGEDEL]
   135  3:
   136    000006:[a#0,SET-b#0,SET]
   137    000007:[c#0,SET-d#0,SET]
   138    000008:[e#0,SET-f#1,SET]
   139    000009:[f#0,SET-g#0,SET]
   140  
   141  compact a-e L1
   142  ----
   143  2:
   144    000010:[a#3,SETWITHDEL-c#inf,RANGEDEL]
   145    000011:[c#2,RANGEDEL-e#inf,RANGEDEL]
   146    000012:[e#2,RANGEDEL-f#inf,RANGEDEL]
   147    000013:[f#2,RANGEDEL-g#inf,RANGEDEL]
   148  3:
   149    000006:[a#0,SET-b#0,SET]
   150    000007:[c#0,SET-d#0,SET]
   151    000008:[e#0,SET-f#1,SET]
   152    000009:[f#0,SET-g#0,SET]
   153  
   154  # A range tombstone covers multiple grandparent file boundaries between point keys,
   155  # rather than after all point keys.
   156  
   157  define target-file-sizes=(1, 1, 1, 1)
   158  L1
   159    a.SET.3:v
   160    h.SET.3:v
   161  L2
   162    a.RANGEDEL.2:g
   163  L3
   164    a.SET.0:v
   165    b.SET.0:v
   166  L3
   167    c.SET.0:v
   168    d.SET.0:v
   169  L3
   170    e.SET.0:v
   171    f.SET.1:v
   172  ----
   173  1:
   174    000004:[a#3,SET-h#3,SET]
   175  2:
   176    000005:[a#2,RANGEDEL-g#inf,RANGEDEL]
   177  3:
   178    000006:[a#0,SET-b#0,SET]
   179    000007:[c#0,SET-d#0,SET]
   180    000008:[e#0,SET-f#1,SET]
   181  
   182  compact a-e L1
   183  ----
   184  2:
   185    000009:[a#3,SETWITHDEL-c#inf,RANGEDEL]
   186    000010:[c#2,RANGEDEL-h#3,SET]
   187  3:
   188    000006:[a#0,SET-b#0,SET]
   189    000007:[c#0,SET-d#0,SET]
   190    000008:[e#0,SET-f#1,SET]
   191  
   192  # A range tombstone is the first and only item output by a compaction, and it
   193  # extends past the grandparent file boundary used to limit the size of future
   194  # compactions. Verify the range tombstone is split at that file boundary.
   195  
   196  define target-file-sizes=(1, 1, 1, 1)
   197  L1
   198    a.RANGEDEL.3:e
   199  L2
   200    a.SET.2:v
   201  L3
   202    a.SET.0:v
   203    b.SET.0:v
   204  L3
   205    c.SET.0:v
   206    d.SET.0:v
   207  ----
   208  1:
   209    000004:[a#3,RANGEDEL-e#inf,RANGEDEL]
   210  2:
   211    000005:[a#2,SET-a#2,SET]
   212  3:
   213    000006:[a#0,SET-b#0,SET]
   214    000007:[c#0,SET-d#0,SET]
   215  
   216  compact a-e L1
   217  ----
   218  2:
   219    000008:[a#3,RANGEDEL-c#inf,RANGEDEL]
   220    000009:[c#3,RANGEDEL-e#inf,RANGEDEL]
   221  3:
   222    000006:[a#0,SET-b#0,SET]
   223    000007:[c#0,SET-d#0,SET]
   224  
   225  # An elided range tombstone is the first item encountered by a compaction,
   226  # and the grandparent limit set by it extends to the next item, also a range
   227  # tombstone. The first item should be elided, and the second item should
   228  # reset the grandparent limit.
   229  
   230  define target-file-sizes=(100, 100, 100, 100)
   231  L1
   232    a.RANGEDEL.4:d
   233  L1
   234    grandparent.RANGEDEL.2:z
   235    h.SET.3:v
   236  L2
   237    grandparent.SET.1:v
   238  L3
   239    grandparent.SET.0:v
   240  L3
   241    m.SET.0:v
   242  ----
   243  1:
   244    000004:[a#4,RANGEDEL-d#inf,RANGEDEL]
   245    000005:[grandparent#2,RANGEDEL-z#inf,RANGEDEL]
   246  2:
   247    000006:[grandparent#1,SET-grandparent#1,SET]
   248  3:
   249    000007:[grandparent#0,SET-grandparent#0,SET]
   250    000008:[m#0,SET-m#0,SET]
   251  
   252  compact a-h L1
   253  ----
   254  2:
   255    000009:[grandparent#2,RANGEDEL-m#inf,RANGEDEL]
   256    000010:[m#2,RANGEDEL-z#inf,RANGEDEL]
   257  3:
   258    000007:[grandparent#0,SET-grandparent#0,SET]
   259    000008:[m#0,SET-m#0,SET]
   260  
   261  # Setup such that grandparent overlap limit is exceeded multiple times at the same user key ("b").
   262  # Ensures the compaction output files are non-overlapping.
   263  
   264  define target-file-sizes=(1, 1, 1, 1)
   265  L1
   266    a.SET.2:v
   267    c.SET.2:v
   268  L2
   269    a.RANGEDEL.3:c
   270  L3
   271    b.SET.2:v
   272  L3
   273    b.SET.1:v
   274  L3
   275    b.SET.0:v
   276  ----
   277  1:
   278    000004:[a#2,SET-c#2,SET]
   279  2:
   280    000005:[a#3,RANGEDEL-c#inf,RANGEDEL]
   281  3:
   282    000006:[b#2,SET-b#2,SET]
   283    000007:[b#1,SET-b#1,SET]
   284    000008:[b#0,SET-b#0,SET]
   285  
   286  compact a-c L1
   287  ----
   288  2:
   289    000009:[a#3,RANGEDEL-b#inf,RANGEDEL]
   290    000010:[b#3,RANGEDEL-c#2,SET]
   291  3:
   292    000006:[b#2,SET-b#2,SET]
   293    000007:[b#1,SET-b#1,SET]
   294    000008:[b#0,SET-b#0,SET]
   295  
   296  # Regression test for a bug where compaction would stop process range
   297  # tombstones for an input level upon finding an sstable in the input
   298  # level with no range tombstones. In the scenario below, sstable 6
   299  # does not contain any range tombstones while sstable 7 does. Both are
   300  # compacted together with sstable 5.
   301  
   302  reset
   303  ----
   304  
   305  batch
   306  set a 1
   307  set b 1
   308  set c 1
   309  set d 1
   310  set z 1
   311  ----
   312  
   313  compact a-z
   314  ----
   315  6:
   316    000005:[a#10,SET-z#14,SET]
   317  
   318  build ext1
   319  set a 2
   320  ----
   321  
   322  build ext2
   323  set b 2
   324  del-range c z
   325  ----
   326  
   327  ingest ext1 ext2
   328  ----
   329  0.0:
   330    000006:[a#15,SET-a#15,SET]
   331    000007:[b#16,SET-z#inf,RANGEDEL]
   332  6:
   333    000005:[a#10,SET-z#14,SET]
   334  
   335  iter
   336  first
   337  next
   338  next
   339  next
   340  ----
   341  a: (2, .)
   342  b: (2, .)
   343  z: (1, .)
   344  .
   345  
   346  compact a-z
   347  ----
   348  6:
   349    000008:[a#0,SET-z#0,SET]
   350  
   351  iter
   352  first
   353  next
   354  next
   355  next
   356  ----
   357  a: (2, .)
   358  b: (2, .)
   359  z: (1, .)
   360  .
   361  
   362  # Regresion test for a bug in sstable smallest boundary generation
   363  # where the smallest key for an sstable was set to a key "larger" than
   364  # the start key of the first range tombstone. This in turn fouled up
   365  # the processing logic of range tombstones used by mergingIter which
   366  # allowed stepping out of an sstable even though it contained a range
   367  # tombstone that covered keys in lower levels.
   368  
   369  define target-file-sizes=(1, 1, 1, 1)
   370  L0
   371    c.SET.4:4
   372  L1
   373    a.SET.3:3
   374  L2
   375    a.RANGEDEL.2:e
   376  L3
   377    b.SET.1:1
   378  ----
   379  0.0:
   380    000004:[c#4,SET-c#4,SET]
   381  1:
   382    000005:[a#3,SET-a#3,SET]
   383  2:
   384    000006:[a#2,RANGEDEL-e#inf,RANGEDEL]
   385  3:
   386    000007:[b#1,SET-b#1,SET]
   387  
   388  compact a-e L1
   389  ----
   390  0.0:
   391    000004:[c#4,SET-c#4,SET]
   392  2:
   393    000008:[a#3,SETWITHDEL-b#inf,RANGEDEL]
   394    000009:[b#2,RANGEDEL-e#inf,RANGEDEL]
   395  3:
   396    000007:[b#1,SET-b#1,SET]
   397  
   398  # We should only see a:3 and c:4 at this point.
   399  
   400  iter
   401  first
   402  next
   403  next
   404  ----
   405  a: (3, .)
   406  c: (4, .)
   407  .
   408  
   409  # The bug allowed seeing b:1 during reverse iteration.
   410  
   411  iter
   412  last
   413  prev
   414  prev
   415  ----
   416  c: (4, .)
   417  a: (3, .)
   418  .
   419  
   420  # This is a similar scenario to the one above. In older versions of Pebble this
   421  # case necessitated adjusting the seqnum of the range tombstone to
   422  # prev.LargestKey.SeqNum-1. We no longer allow user keys to be split across
   423  # sstables, and the seqnum adjustment is no longer necessary.
   424  #
   425  # Note the target-file-size of 26 is specially tailored to get the
   426  # desired compaction output.
   427  
   428  define target-file-sizes=(26, 26, 26, 26) snapshots=(1, 2, 3)
   429  L1
   430    a.SET.4:4
   431  L1
   432    b.SET.2:2
   433    b.RANGEDEL.3:e
   434  L3
   435    b.SET.1:1
   436  ----
   437  1:
   438    000004:[a#4,SET-a#4,SET]
   439    000005:[b#3,RANGEDEL-e#inf,RANGEDEL]
   440  3:
   441    000006:[b#1,SET-b#1,SET]
   442  
   443  compact a-e L1
   444  ----
   445  2:
   446    000007:[a#4,SET-a#4,SET]
   447    000008:[b#3,RANGEDEL-e#inf,RANGEDEL]
   448  3:
   449    000006:[b#1,SET-b#1,SET]
   450  
   451  iter
   452  first
   453  next
   454  last
   455  prev
   456  ----
   457  a: (4, .)
   458  .
   459  a: (4, .)
   460  .
   461  
   462  # Similar to the preceding scenario, except the range tombstone has
   463  # the same seqnum as the largest key in the preceding file.
   464  
   465  define target-file-sizes=(26, 26, 26, 26) snapshots=(1, 2, 3)
   466  L1
   467    a.SET.4:4
   468  L1
   469    b.SET.3:3
   470    b.RANGEDEL.3:e
   471  L3
   472    b.SET.1:1
   473  ----
   474  1:
   475    000004:[a#4,SET-a#4,SET]
   476    000005:[b#3,RANGEDEL-e#inf,RANGEDEL]
   477  3:
   478    000006:[b#1,SET-b#1,SET]
   479  
   480  compact a-e L1
   481  ----
   482  2:
   483    000007:[a#4,SET-a#4,SET]
   484    000008:[b#3,RANGEDEL-e#inf,RANGEDEL]
   485  3:
   486    000006:[b#1,SET-b#1,SET]
   487  
   488  iter
   489  first
   490  next
   491  next
   492  last
   493  prev
   494  prev
   495  ----
   496  a: (4, .)
   497  b: (3, .)
   498  .
   499  b: (3, .)
   500  a: (4, .)
   501  .
   502  
   503  # Similar to the preceding scenario, except the range tombstone has
   504  # a smaller seqnum than the largest key in the preceding file.
   505  
   506  define target-file-sizes=(26, 26, 26, 26) snapshots=(1, 2, 3)
   507  L1
   508    a.SET.4:4
   509  L1
   510    b.SET.4:4
   511    b.RANGEDEL.2:e
   512  L3
   513    b.SET.1:1
   514  ----
   515  1:
   516    000004:[a#4,SET-a#4,SET]
   517    000005:[b#4,SET-e#inf,RANGEDEL]
   518  3:
   519    000006:[b#1,SET-b#1,SET]
   520  
   521  compact a-e L1
   522  ----
   523  2:
   524    000007:[a#4,SET-a#4,SET]
   525    000008:[b#4,SET-e#inf,RANGEDEL]
   526  3:
   527    000006:[b#1,SET-b#1,SET]
   528  
   529  iter
   530  first
   531  next
   532  next
   533  last
   534  prev
   535  prev
   536  ----
   537  a: (4, .)
   538  b: (4, .)
   539  .
   540  b: (4, .)
   541  a: (4, .)
   542  .
   543  
   544  # Test a scenario where the last point key in an sstable has a seqnum
   545  # of 0.
   546  
   547  define target-file-sizes=(1, 1, 26) snapshots=(2)
   548  L1
   549    a.SET.3:3
   550    b.RANGEDEL.3:e
   551    b.SET.0:0
   552  L3
   553    a.RANGEDEL.2:b
   554  L3
   555    c.SET.0:0
   556    d.SET.0:0
   557  ----
   558  1:
   559    000004:[a#3,SET-e#inf,RANGEDEL]
   560  3:
   561    000005:[a#2,RANGEDEL-b#inf,RANGEDEL]
   562    000006:[c#0,SET-d#0,SET]
   563  
   564  iter
   565  last
   566  prev
   567  ----
   568  a: (3, .)
   569  .
   570  
   571  compact a-e L1
   572  ----
   573  2:
   574    000007:[a#3,SET-c#inf,RANGEDEL]
   575    000008:[c#3,RANGEDEL-e#inf,RANGEDEL]
   576  3:
   577    000005:[a#2,RANGEDEL-b#inf,RANGEDEL]
   578    000006:[c#0,SET-d#0,SET]
   579  
   580  iter
   581  last
   582  prev
   583  ----
   584  a: (3, .)
   585  .
   586  
   587  # Test a scenario where the last point key in an sstable before the
   588  # grandparent limit is reached has a seqnum of 0. We want to cut the
   589  # sstable after the next point key is added, rather than continuing to
   590  # add keys indefinitely (or till the size limit is reached).
   591  
   592  define target-file-sizes=(100, 1, 52) snapshots=(2)
   593  L1
   594    a.SET.3:3
   595    b.RANGEDEL.3:e
   596    b.SET.0:0
   597    c.SET.3:1
   598    d.SET.1:1
   599  L3
   600    c.RANGEDEL.2:d
   601  ----
   602  1:
   603    000004:[a#3,SET-e#inf,RANGEDEL]
   604  3:
   605    000005:[c#2,RANGEDEL-d#inf,RANGEDEL]
   606  
   607  compact a-f L1
   608  ----
   609  2:
   610    000006:[a#3,SET-c#inf,RANGEDEL]
   611    000007:[c#3,RANGEDEL-e#inf,RANGEDEL]
   612  3:
   613    000005:[c#2,RANGEDEL-d#inf,RANGEDEL]
   614  
   615  
   616  # Test a scenario where we the last point key in an sstable has a
   617  # seqnum of 0, but there is another range tombstone later in the
   618  # compaction. This scenario was previously triggering an assertion due
   619  # to the rangedel.Fragmenter being finished prematurely.
   620  
   621  define target-file-sizes=(1, 1, 1)
   622  L1
   623    a.SET.0:0
   624    c.RANGEDEL.1:d
   625  L3
   626    b.SET.0:0
   627  ----
   628  1:
   629    000004:[a#0,SET-d#inf,RANGEDEL]
   630  3:
   631    000005:[b#0,SET-b#0,SET]
   632  
   633  compact a-e L1
   634  ----
   635  2:
   636    000006:[a#0,SET-a#0,SET]
   637  3:
   638    000005:[b#0,SET-b#0,SET]
   639  
   640  define target-file-sizes=(1, 1, 1, 1)
   641  L0
   642    b.SET.1:v
   643  L0
   644    a.SET.2:v
   645  ----
   646  0.0:
   647    000005:[a#2,SET-a#2,SET]
   648    000004:[b#1,SET-b#1,SET]
   649  
   650  add-ongoing-compaction startLevel=0 outputLevel=1 start=a end=z
   651  ----
   652  
   653  async-compact a-b L0
   654  ----
   655  manual compaction blocked until ongoing finished
   656  1:
   657    000006:[a#0,SET-a#0,SET]
   658    000007:[b#0,SET-b#0,SET]
   659  
   660  compact a-b L1
   661  ----
   662  2:
   663    000008:[a#0,SET-a#0,SET]
   664    000009:[b#0,SET-b#0,SET]
   665  
   666  add-ongoing-compaction startLevel=0 outputLevel=1 start=a end=z
   667  ----
   668  
   669  async-compact a-b L2
   670  ----
   671  manual compaction blocked until ongoing finished
   672  3:
   673    000010:[a#0,SET-a#0,SET]
   674    000011:[b#0,SET-b#0,SET]
   675  
   676  add-ongoing-compaction startLevel=0 outputLevel=1 start=a end=z
   677  ----
   678  
   679  set-concurrent-compactions num=2
   680  ----
   681  
   682  async-compact a-b L3
   683  ----
   684  manual compaction did not block for ongoing
   685  4:
   686    000012:[a#0,SET-a#0,SET]
   687    000013:[b#0,SET-b#0,SET]
   688  
   689  remove-ongoing-compaction
   690  ----
   691  
   692  add-ongoing-compaction startLevel=4 outputLevel=5 start=a end=b
   693  ----
   694  
   695  async-compact a-b L4
   696  ----
   697  manual compaction blocked until ongoing finished
   698  5:
   699    000014:[a#0,SET-a#0,SET]
   700    000015:[b#0,SET-b#0,SET]
   701  
   702  # Test of a scenario where consecutive elided range tombstones and grandparent
   703  # boundaries could result in an invariant violation in the rangedel fragmenter.
   704  
   705  define target-file-sizes=(1, 1, 1, 1)
   706  L1
   707    a.RANGEDEL.4:b
   708    c.RANGEDEL.4:d
   709    e.RANGEDEL.4:f
   710  L1
   711    g.RANGEDEL.6:h
   712    i.RANGEDEL.4:j
   713  L1
   714    k.RANGEDEL.5:q
   715    m.RANGEDEL.4:q
   716  L2
   717    a.SET.2:foo
   718  L3
   719    a.SET.1:foo
   720    c.SET.1:foo
   721  L3
   722    ff.SET.1:v
   723  L3
   724    k.SET.1:foo
   725  ----
   726  1:
   727    000004:[a#4,RANGEDEL-f#inf,RANGEDEL]
   728    000005:[g#6,RANGEDEL-j#inf,RANGEDEL]
   729    000006:[k#5,RANGEDEL-q#inf,RANGEDEL]
   730  2:
   731    000007:[a#2,SET-a#2,SET]
   732  3:
   733    000008:[a#1,SET-c#1,SET]
   734    000009:[ff#1,SET-ff#1,SET]
   735    000010:[k#1,SET-k#1,SET]
   736  
   737  compact a-q L1
   738  ----
   739  2:
   740    000011:[a#4,RANGEDEL-d#inf,RANGEDEL]
   741    000012:[k#5,RANGEDEL-m#inf,RANGEDEL]
   742  3:
   743    000008:[a#1,SET-c#1,SET]
   744    000009:[ff#1,SET-ff#1,SET]
   745    000010:[k#1,SET-k#1,SET]
   746  
   747  # Test a case where a new output file is started, there are no previous output
   748  # files, there are no additional keys (key = nil) and the rangedel fragmenter
   749  # is non-empty.
   750  define target-file-sizes=(1, 1, 1)
   751  L1
   752    a.RANGEDEL.10:b
   753    d.RANGEDEL.9:e
   754    q.RANGEDEL.8:r
   755  L2
   756    g.RANGEDEL.7:h
   757  L3
   758    q.SET.6:6
   759  ----
   760  1:
   761    000004:[a#10,RANGEDEL-r#inf,RANGEDEL]
   762  2:
   763    000005:[g#7,RANGEDEL-h#inf,RANGEDEL]
   764  3:
   765    000006:[q#6,SET-q#6,SET]
   766  
   767  compact a-r L1
   768  ----
   769  2:
   770    000007:[q#8,RANGEDEL-r#inf,RANGEDEL]
   771  3:
   772    000006:[q#6,SET-q#6,SET]
   773  
   774  define target-file-sizes=(100, 100, 100)
   775  L1
   776    a.RANGEDEL.10:b
   777    b.SET.0:foo
   778    d.RANGEDEL.0:e
   779    j.SET.10:foo
   780  L2
   781    f.RANGEDEL.7:g
   782  L3
   783    c.SET.6:6
   784  L3
   785    c.SET.5:5
   786  L3
   787    c.SET.4:4
   788  L4
   789    a.SET.0:0
   790    f.SET.0:0
   791  ----
   792  1:
   793    000004:[a#10,RANGEDEL-j#10,SET]
   794  2:
   795    000005:[f#7,RANGEDEL-g#inf,RANGEDEL]
   796  3:
   797    000006:[c#6,SET-c#6,SET]
   798    000007:[c#5,SET-c#5,SET]
   799    000008:[c#4,SET-c#4,SET]
   800  4:
   801    000009:[a#0,SET-f#0,SET]
   802  
   803  compact a-r L1
   804  ----
   805  2:
   806    000010:[a#10,RANGEDEL-b#0,SET]
   807    000011:[d#0,RANGEDEL-j#10,SET]
   808  3:
   809    000006:[c#6,SET-c#6,SET]
   810    000007:[c#5,SET-c#5,SET]
   811    000008:[c#4,SET-c#4,SET]
   812  4:
   813    000009:[a#0,SET-f#0,SET]
   814  
   815  # Test a snapshot that separates a range deletion from all the data that it
   816  # deletes. Ensure that we respect the target-file-size and split into multiple
   817  # outputs.
   818  
   819  define target-file-sizes=(1, 1, 1) snapshots=(14)
   820  L1
   821    a.RANGEDEL.15:z
   822    b.SET.11:foo
   823    c.SET.11:foo
   824  L2
   825    c.SET.0:foo
   826    d.SET.0:foo
   827  ----
   828  1:
   829    000004:[a#15,RANGEDEL-z#inf,RANGEDEL]
   830  2:
   831    000005:[c#0,SET-d#0,SET]
   832  
   833  compact a-z L1
   834  ----
   835  2:
   836    000006:[a#15,RANGEDEL-c#inf,RANGEDEL]
   837    000007:[c#15,RANGEDEL-d#inf,RANGEDEL]
   838    000008:[d#15,RANGEDEL-z#inf,RANGEDEL]
   839  
   840  # Test an interaction between a range deletion that will be elided with
   841  # output splitting. Ensure that the output is still split (previous versions
   842  # of the code did not, because of intricacies around preventing a zero
   843  # sequence number in an output's largest key).
   844  
   845  define target-file-sizes=(1, 1, 1)
   846  L1
   847    a.RANGEDEL.10:z
   848    b.SET.11:foo
   849    c.SET.11:foo
   850  L2
   851    c.SET.0:foo
   852    d.SET.0:foo
   853  ----
   854  1:
   855    000004:[a#10,RANGEDEL-z#inf,RANGEDEL]
   856  2:
   857    000005:[c#0,SET-d#0,SET]
   858  
   859  compact a-z L1
   860  ----
   861  2:
   862    000006:[b#0,SET-b#0,SET]
   863    000007:[c#0,SET-c#0,SET]