github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/testdata/ingest (about)

     1  ingest
     2  ----
     3  
     4  ingest non-existent
     5  ----
     6  open non-existent: file does not exist
     7  
     8  # Elide ingestion of empty sstables.
     9  
    10  build ext0
    11  ----
    12  
    13  ingest ext0
    14  ----
    15  
    16  lsm
    17  ----
    18  
    19  build ext0 format=pebblev2
    20  set a 1
    21  set b 2
    22  ----
    23  
    24  ingest ext0
    25  ----
    26  
    27  lsm
    28  ----
    29  6:
    30    000006:[a#10,SET-b#10,SET]
    31  
    32  metrics
    33  ----
    34        |                             |       |       |   ingested   |     moved    |    written   |       |    amp
    35  level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
    36  ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    37      0 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    38      1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    39      2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    40      3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    41      4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    42      5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    43      6 |     1   696B     0B       0 |     - |    0B |     1   696B |     0     0B |     0     0B |    0B |   1  0.0
    44  total |     1   696B     0B       0 |     - |  696B |     1   696B |     0     0B |     0   696B |    0B |   1  1.0
    45  -------------------------------------------------------------------------------------------------------------------
    46  WAL: 1 files (0B)  in: 0B  written: 0B (0% overhead)
    47  Flushes: 0
    48  Compactions: 0  estimated debt: 0B  in progress: 0 (0B)
    49               default: 0  delete: 0  elision: 0  move: 0  read: 0  rewrite: 0  multi-level: 0
    50  MemTables: 1 (256KB)  zombie: 0 (0B)
    51  Zombie tables: 0 (0B)
    52  Backing tables: 0 (0B)
    53  Virtual tables: 0 (0B)
    54  Block cache: 6 entries (1.2KB)  hit rate: 35.7%
    55  Table cache: 1 entries (800B)  hit rate: 50.0%
    56  Secondary cache: 0 entries (0B)  hit rate: 0.0%
    57  Snapshots: 0  earliest seq num: 0
    58  Table iters: 0
    59  Filter utility: 0.0%
    60  Ingestions: 1  as flushable: 0 (0B in 0 tables)
    61  
    62  
    63  iter
    64  seek-ge a
    65  next
    66  next
    67  ----
    68  a: (1, .)
    69  b: (2, .)
    70  .
    71  
    72  get
    73  a
    74  b
    75  ----
    76  a:1
    77  b:2
    78  
    79  wait-pending-table-stats
    80  000006
    81  ----
    82  num-entries: 2
    83  num-deletions: 0
    84  num-range-key-sets: 0
    85  point-deletions-bytes-estimate: 0
    86  range-deletions-bytes-estimate: 0
    87  
    88  build ext1
    89  set a 3
    90  del b
    91  ----
    92  
    93  ingest ext1
    94  ----
    95  
    96  lsm
    97  ----
    98  0.0:
    99    000007:[a#11,SET-b#11,DEL]
   100  6:
   101    000006:[a#10,SET-b#10,SET]
   102  
   103  iter
   104  seek-ge a
   105  next
   106  ----
   107  a: (3, .)
   108  .
   109  
   110  get
   111  a
   112  b
   113  ----
   114  a:3
   115  b: pebble: not found
   116  
   117  build ext2 format=pebblev2
   118  set a 4
   119  set b 5
   120  set c 6
   121  ----
   122  
   123  ingest ext2
   124  ----
   125  
   126  lsm
   127  ----
   128  0.1:
   129    000008:[a#12,SET-c#12,SET]
   130  0.0:
   131    000007:[a#11,SET-b#11,DEL]
   132  6:
   133    000006:[a#10,SET-b#10,SET]
   134  
   135  iter
   136  seek-ge a
   137  next
   138  next
   139  ----
   140  a: (4, .)
   141  b: (5, .)
   142  c: (6, .)
   143  
   144  get
   145  a
   146  b
   147  c
   148  ----
   149  a:4
   150  b:5
   151  c:6
   152  
   153  build ext3
   154  merge b 5
   155  del c
   156  ----
   157  
   158  ingest ext3
   159  ----
   160  
   161  lsm
   162  ----
   163  0.2:
   164    000009:[b#13,MERGE-c#13,DEL]
   165  0.1:
   166    000008:[a#12,SET-c#12,SET]
   167  0.0:
   168    000007:[a#11,SET-b#11,DEL]
   169  6:
   170    000006:[a#10,SET-b#10,SET]
   171  
   172  iter
   173  seek-ge a
   174  next
   175  next
   176  ----
   177  a: (4, .)
   178  b: (55, .)
   179  .
   180  
   181  get
   182  a
   183  b
   184  c
   185  ----
   186  a:4
   187  b:55
   188  c: pebble: not found
   189  
   190  build ext4
   191  set x 7
   192  set y 8
   193  ----
   194  
   195  ingest ext4
   196  ----
   197  
   198  lsm
   199  ----
   200  0.2:
   201    000009:[b#13,MERGE-c#13,DEL]
   202  0.1:
   203    000008:[a#12,SET-c#12,SET]
   204  0.0:
   205    000007:[a#11,SET-b#11,DEL]
   206  6:
   207    000006:[a#10,SET-b#10,SET]
   208    000010:[x#14,SET-y#14,SET]
   209  
   210  iter
   211  seek-lt y
   212  prev
   213  prev
   214  ----
   215  x: (7, .)
   216  b: (55, .)
   217  a: (4, .)
   218  
   219  get
   220  x
   221  y
   222  ----
   223  x:7
   224  y:8
   225  
   226  batch
   227  set j 9
   228  set k 10
   229  ----
   230  
   231  # Overlap with point keys in memtable, hence memtable will be flushed.
   232  
   233  build ext5
   234  set k 11
   235  ----
   236  
   237  ingest ext5
   238  ----
   239  memtable flushed
   240  
   241  lsm
   242  ----
   243  0.2:
   244    000009:[b#13,MERGE-c#13,DEL]
   245  0.1:
   246    000008:[a#12,SET-c#12,SET]
   247    000011:[k#17,SET-k#17,SET]
   248  0.0:
   249    000007:[a#11,SET-b#11,DEL]
   250    000014:[j#15,SET-k#16,SET]
   251  6:
   252    000006:[a#10,SET-b#10,SET]
   253    000010:[x#14,SET-y#14,SET]
   254  
   255  iter
   256  seek-ge j
   257  next
   258  ----
   259  j: (9, .)
   260  k: (11, .)
   261  
   262  get
   263  j
   264  k
   265  ----
   266  j:9
   267  k:11
   268  
   269  # No data overlap in memtable, hence it will not be flushed.
   270  
   271  batch
   272  set m 12
   273  ----
   274  
   275  build ext6
   276  set n 13
   277  ----
   278  
   279  ingest ext6
   280  ----
   281  
   282  lsm
   283  ----
   284  0.2:
   285    000009:[b#13,MERGE-c#13,DEL]
   286  0.1:
   287    000008:[a#12,SET-c#12,SET]
   288    000011:[k#17,SET-k#17,SET]
   289  0.0:
   290    000007:[a#11,SET-b#11,DEL]
   291    000014:[j#15,SET-k#16,SET]
   292  6:
   293    000006:[a#10,SET-b#10,SET]
   294    000015:[n#19,SET-n#19,SET]
   295    000010:[x#14,SET-y#14,SET]
   296  
   297  get
   298  m
   299  n
   300  ----
   301  m:12
   302  n:13
   303  
   304  build ext7 format=pebblev2
   305  del-range a c
   306  del-range x z
   307  ----
   308  
   309  ingest ext7
   310  ----
   311  memtable flushed
   312  
   313  lsm
   314  ----
   315  0.3:
   316    000016:[a#20,RANGEDEL-z#inf,RANGEDEL]
   317  0.2:
   318    000009:[b#13,MERGE-c#13,DEL]
   319  0.1:
   320    000008:[a#12,SET-c#12,SET]
   321    000011:[k#17,SET-k#17,SET]
   322  0.0:
   323    000007:[a#11,SET-b#11,DEL]
   324    000014:[j#15,SET-k#16,SET]
   325    000019:[m#18,SET-m#18,SET]
   326  6:
   327    000006:[a#10,SET-b#10,SET]
   328    000015:[n#19,SET-n#19,SET]
   329    000010:[x#14,SET-y#14,SET]
   330  
   331  get
   332  a
   333  b
   334  c
   335  j
   336  k
   337  m
   338  n
   339  x
   340  y
   341  ----
   342  a: pebble: not found
   343  b: pebble: not found
   344  c: pebble: not found
   345  j:9
   346  k:11
   347  m:12
   348  n:13
   349  x: pebble: not found
   350  y: pebble: not found
   351  
   352  wait-pending-table-stats
   353  000016
   354  ----
   355  num-entries: 2
   356  num-deletions: 2
   357  num-range-key-sets: 0
   358  point-deletions-bytes-estimate: 0
   359  range-deletions-bytes-estimate: 1420
   360  
   361  # A set operation takes precedence over a range deletion at the same
   362  # sequence number as can occur during ingestion.
   363  
   364  build ext8
   365  set j 20
   366  del-range j k
   367  set m 30
   368  ----
   369  
   370  ingest ext8
   371  ----
   372  
   373  get
   374  j
   375  k
   376  m
   377  ----
   378  j:20
   379  k:11
   380  m:30
   381  
   382  build ext9
   383  set a 40
   384  set f 40
   385  set g 40
   386  ----
   387  
   388  ingest ext9
   389  ----
   390  
   391  lsm
   392  ----
   393  0.4:
   394    000021:[a#22,SET-g#22,SET]
   395    000020:[j#21,RANGEDEL-m#21,SET]
   396  0.3:
   397    000016:[a#20,RANGEDEL-z#inf,RANGEDEL]
   398  0.2:
   399    000009:[b#13,MERGE-c#13,DEL]
   400  0.1:
   401    000008:[a#12,SET-c#12,SET]
   402    000011:[k#17,SET-k#17,SET]
   403  0.0:
   404    000007:[a#11,SET-b#11,DEL]
   405    000014:[j#15,SET-k#16,SET]
   406    000019:[m#18,SET-m#18,SET]
   407  6:
   408    000006:[a#10,SET-b#10,SET]
   409    000015:[n#19,SET-n#19,SET]
   410    000010:[x#14,SET-y#14,SET]
   411  
   412  # Overlap with sst boundary containing range del sentinel (fileNum 000015) is not considered an overlap since
   413  # range del's end key is exclusive. Hence ext9 gets ingested into L6.
   414  
   415  build ext10
   416  set z 40
   417  ----
   418  
   419  # Although ext11 falls into sst boundaries of fileNum 000019, 000015, they don't actually contain any key within ext11's boundary.
   420  # Hence ext11 is allowed to go further down and get ingested into L6.
   421  
   422  build ext11
   423  set d 40
   424  ----
   425  
   426  # Overlap with fileNum 000018 is not considered an overlap since ext12's end key is range del sentinel which is exclusive.
   427  
   428  build ext12
   429  del-range i j
   430  ----
   431  
   432  # Ingesting multiple files into L0 is allowed.
   433  
   434  ingest ext10 ext11 ext12
   435  ----
   436  
   437  get
   438  z
   439  d
   440  ----
   441  z:40
   442  d:40
   443  
   444  lsm
   445  ----
   446  0.4:
   447    000021:[a#22,SET-g#22,SET]
   448    000020:[j#21,RANGEDEL-m#21,SET]
   449  0.3:
   450    000016:[a#20,RANGEDEL-z#inf,RANGEDEL]
   451  0.2:
   452    000009:[b#13,MERGE-c#13,DEL]
   453  0.1:
   454    000008:[a#12,SET-c#12,SET]
   455    000011:[k#17,SET-k#17,SET]
   456  0.0:
   457    000007:[a#11,SET-b#11,DEL]
   458    000014:[j#15,SET-k#16,SET]
   459    000019:[m#18,SET-m#18,SET]
   460  6:
   461    000006:[a#10,SET-b#10,SET]
   462    000023:[d#23,SET-d#23,SET]
   463    000024:[i#24,RANGEDEL-j#inf,RANGEDEL]
   464    000015:[n#19,SET-n#19,SET]
   465    000010:[x#14,SET-y#14,SET]
   466    000022:[z#25,SET-z#25,SET]
   467  
   468  # No overlap between fileNum 000019 that contains point key f, since f is ingested file's range del sentinel.
   469  
   470  build ext13
   471  del-range e f
   472  ----
   473  
   474  ingest ext13
   475  ----
   476  
   477  lsm
   478  ----
   479  0.4:
   480    000021:[a#22,SET-g#22,SET]
   481    000020:[j#21,RANGEDEL-m#21,SET]
   482  0.3:
   483    000016:[a#20,RANGEDEL-z#inf,RANGEDEL]
   484  0.2:
   485    000009:[b#13,MERGE-c#13,DEL]
   486  0.1:
   487    000008:[a#12,SET-c#12,SET]
   488    000011:[k#17,SET-k#17,SET]
   489  0.0:
   490    000007:[a#11,SET-b#11,DEL]
   491    000014:[j#15,SET-k#16,SET]
   492    000019:[m#18,SET-m#18,SET]
   493  6:
   494    000006:[a#10,SET-b#10,SET]
   495    000023:[d#23,SET-d#23,SET]
   496    000025:[e#26,RANGEDEL-f#inf,RANGEDEL]
   497    000024:[i#24,RANGEDEL-j#inf,RANGEDEL]
   498    000015:[n#19,SET-n#19,SET]
   499    000010:[x#14,SET-y#14,SET]
   500    000022:[z#25,SET-z#25,SET]
   501  
   502  # Overlap with range delete keys in memtable, hence memtable will be flushed.
   503  
   504  batch
   505  del-range a d
   506  ----
   507  
   508  build ext14
   509  set b 1
   510  ----
   511  
   512  ingest ext14
   513  ----
   514  memtable flushed
   515  
   516  lsm
   517  ----
   518  0.6:
   519    000026:[b#28,SET-b#28,SET]
   520  0.5:
   521    000029:[a#27,RANGEDEL-d#inf,RANGEDEL]
   522  0.4:
   523    000021:[a#22,SET-g#22,SET]
   524    000020:[j#21,RANGEDEL-m#21,SET]
   525  0.3:
   526    000016:[a#20,RANGEDEL-z#inf,RANGEDEL]
   527  0.2:
   528    000009:[b#13,MERGE-c#13,DEL]
   529  0.1:
   530    000008:[a#12,SET-c#12,SET]
   531    000011:[k#17,SET-k#17,SET]
   532  0.0:
   533    000007:[a#11,SET-b#11,DEL]
   534    000014:[j#15,SET-k#16,SET]
   535    000019:[m#18,SET-m#18,SET]
   536  6:
   537    000006:[a#10,SET-b#10,SET]
   538    000023:[d#23,SET-d#23,SET]
   539    000025:[e#26,RANGEDEL-f#inf,RANGEDEL]
   540    000024:[i#24,RANGEDEL-j#inf,RANGEDEL]
   541    000015:[n#19,SET-n#19,SET]
   542    000010:[x#14,SET-y#14,SET]
   543    000022:[z#25,SET-z#25,SET]
   544  
   545  reset
   546  ----
   547  
   548  # Tests to show that keys don't overlap with range delete sentinels.
   549  
   550  batch
   551  set b 1
   552  ----
   553  
   554  build ext15
   555  del-range a b
   556  ----
   557  
   558  ingest ext15
   559  ----
   560  
   561  lsm
   562  ----
   563  6:
   564    000004:[a#11,RANGEDEL-b#inf,RANGEDEL]
   565  
   566  reset
   567  ----
   568  
   569  batch
   570  del-range b c
   571  ----
   572  
   573  build ext16
   574  del-range a b
   575  ----
   576  
   577  ingest ext16
   578  ----
   579  
   580  lsm
   581  ----
   582  6:
   583    000004:[a#11,RANGEDEL-b#inf,RANGEDEL]
   584  
   585  reset
   586  ----
   587  
   588  # Tests for branch coverage of method overlapWithIterator,
   589  # when levelIter is used and it produces a range del sentinel boundary
   590  # because it finds no overlapping point key.
   591  
   592  # Case 1) levelIter produced boundary is less than ingested file's largest key.
   593  
   594  build ext17
   595  del-range a b
   596  ----
   597  
   598  ingest ext17
   599  ----
   600  
   601  build ext18
   602  set a 10
   603  set c 10
   604  ----
   605  
   606  ingest ext18
   607  ----
   608  
   609  lsm
   610  ----
   611  0.0:
   612    000005:[a#11,SET-c#11,SET]
   613  6:
   614    000004:[a#10,RANGEDEL-b#inf,RANGEDEL]
   615  
   616  reset
   617  ----
   618  
   619  # Case 2) levelIter produced boundary is more than ingested file's largest key.
   620  
   621  build ext19
   622  del-range c d
   623  ----
   624  
   625  ingest ext19
   626  ----
   627  
   628  build ext20
   629  set a 10
   630  set b 10
   631  ----
   632  
   633  ingest ext20
   634  ----
   635  
   636  build ext21
   637  set c 10
   638  ----
   639  
   640  ingest ext21
   641  ----
   642  
   643  lsm
   644  ----
   645  0.0:
   646    000006:[c#12,SET-c#12,SET]
   647  6:
   648    000005:[a#11,SET-b#11,SET]
   649    000004:[c#10,RANGEDEL-d#inf,RANGEDEL]
   650  
   651  reset
   652  ----
   653  
   654  # Case 3) levelIter produced boundary is equal to ingested file's largest key,
   655  # where the latter is not a range del sentinel.
   656  
   657  build ext22
   658  del-range a b
   659  ----
   660  
   661  ingest ext22
   662  ----
   663  
   664  build ext23
   665  set a 10
   666  set b 10
   667  ----
   668  
   669  ingest ext23
   670  ----
   671  
   672  lsm
   673  ----
   674  0.0:
   675    000005:[a#11,SET-b#11,SET]
   676  6:
   677    000004:[a#10,RANGEDEL-b#inf,RANGEDEL]
   678  
   679  reset
   680  ----
   681  
   682  # Case 4) levelIter produced boundary is equal to ingested file's largest key,
   683  # where the latter is a range del sentinel.
   684  
   685  build ext24
   686  del-range a b
   687  ----
   688  
   689  ingest ext24
   690  ----
   691  
   692  build ext25
   693  del-range a b
   694  ----
   695  
   696  ingest ext25
   697  ----
   698  
   699  lsm
   700  ----
   701  0.0:
   702    000005:[a#11,RANGEDEL-b#inf,RANGEDEL]
   703  6:
   704    000004:[a#10,RANGEDEL-b#inf,RANGEDEL]
   705  
   706  # Check for range key ingestion bug fix in
   707  # https://github.com/cockroachdb/pebble/pull/2082. Without the fix, we expect
   708  # the range key associated with the table ext3 to get elided. This test checks
   709  # that the elision does not happen.
   710  reset
   711  ----
   712  
   713  build ext1
   714  range-key-set d g 1 val1
   715  ----
   716  
   717  ingest ext1
   718  ----
   719  
   720  lsm
   721  ----
   722  6:
   723    000004:[d#10,RANGEKEYSET-g#inf,RANGEKEYSET]
   724  
   725  build ext2
   726  range-key-set b e 1 val2
   727  ----
   728  
   729  ingest ext2
   730  ----
   731  
   732  lsm
   733  ----
   734  0.0:
   735    000005:[b#11,RANGEKEYSET-e#inf,RANGEKEYSET]
   736  6:
   737    000004:[d#10,RANGEKEYSET-g#inf,RANGEKEYSET]
   738  
   739  build ext3
   740  range-key-del a c
   741  ----
   742  
   743  ingest ext3
   744  ----
   745  
   746  # Without the fix in #2082 we would expect ext3 file to be ingested into L6.
   747  lsm
   748  ----
   749  0.1:
   750    000006:[a#12,RANGEKEYDEL-c#inf,RANGEKEYDEL]
   751  0.0:
   752    000005:[b#11,RANGEKEYSET-e#inf,RANGEKEYSET]
   753  6:
   754    000004:[d#10,RANGEKEYSET-g#inf,RANGEKEYSET]
   755  
   756  build ext4
   757  set a a
   758  ----
   759  
   760  ingest ext4
   761  ----
   762  
   763  lsm
   764  ----
   765  0.2:
   766    000007:[a#13,SET-a#13,SET]
   767  0.1:
   768    000006:[a#12,RANGEKEYDEL-c#inf,RANGEKEYDEL]
   769  0.0:
   770    000005:[b#11,RANGEKEYSET-e#inf,RANGEKEYSET]
   771  6:
   772    000004:[d#10,RANGEKEYSET-g#inf,RANGEKEYSET]
   773  
   774  compact a aa
   775  ----
   776  
   777  # Without the fix in #2082, we would expect the range key delete a-c to
   778  # get elided as it would be in L6 beneath the b-e range key in L0.
   779  lsm
   780  ----
   781  6:
   782    000008:[a#0,SET-g#inf,RANGEKEYSET]
   783  
   784  # Shouldn't show results for the b-c range as it must be deleted.
   785  iter
   786  first
   787  next
   788  next
   789  next
   790  ----
   791  a: (a, .)
   792  c: (., [c-e) 1=val2 UPDATED)
   793  e: (., [e-g) 1=val1 UPDATED)
   794  .
   795  
   796  # Keys can have exclusive sentinels. Check that files boundaries which contain
   797  # such keys are ingested ingested into the lowest level possible.
   798  reset
   799  ----
   800  
   801  build ext1
   802  set c c
   803  set e e
   804  ----
   805  
   806  ingest ext1
   807  ----
   808  
   809  lsm
   810  ----
   811  6:
   812    000004:[c#10,SET-e#10,SET]
   813  
   814  
   815  build ext2
   816  range-key-set a c 1 val1
   817  ----
   818  
   819  ingest ext2
   820  ----
   821  
   822  lsm
   823  ----
   824  6:
   825    000005:[a#11,RANGEKEYSET-c#inf,RANGEKEYSET]
   826    000004:[c#10,SET-e#10,SET]
   827  
   828  # The following test cases will test that files where the end bound is an
   829  # exclusive sentinel due to range keys are ingested into the correct levels.
   830  build ext3
   831  set f f
   832  set h h
   833  ----
   834  
   835  ingest ext3
   836  ----
   837  
   838  lsm
   839  ----
   840  6:
   841    000005:[a#11,RANGEKEYSET-c#inf,RANGEKEYSET]
   842    000004:[c#10,SET-e#10,SET]
   843    000006:[f#12,SET-h#12,SET]
   844  
   845  
   846  build ext4
   847  range-key-unset eee f 1
   848  ----
   849  
   850  ingest ext4
   851  ----
   852  
   853  lsm
   854  ----
   855  6:
   856    000005:[a#11,RANGEKEYSET-c#inf,RANGEKEYSET]
   857    000004:[c#10,SET-e#10,SET]
   858    000007:[eee#13,RANGEKEYUNSET-f#inf,RANGEKEYUNSET]
   859    000006:[f#12,SET-h#12,SET]
   860  
   861  build ext5
   862  range-key-set ee eee 1 val3
   863  ----
   864  
   865  ingest ext5
   866  ----
   867  
   868  lsm
   869  ----
   870  6:
   871    000005:[a#11,RANGEKEYSET-c#inf,RANGEKEYSET]
   872    000004:[c#10,SET-e#10,SET]
   873    000008:[ee#14,RANGEKEYSET-eee#inf,RANGEKEYSET]
   874    000007:[eee#13,RANGEKEYUNSET-f#inf,RANGEKEYUNSET]
   875    000006:[f#12,SET-h#12,SET]
   876  
   877  build ext6
   878  set x x
   879  set y y
   880  ----
   881  
   882  ingest ext6
   883  ----
   884  
   885  lsm
   886  ----
   887  6:
   888    000005:[a#11,RANGEKEYSET-c#inf,RANGEKEYSET]
   889    000004:[c#10,SET-e#10,SET]
   890    000008:[ee#14,RANGEKEYSET-eee#inf,RANGEKEYSET]
   891    000007:[eee#13,RANGEKEYUNSET-f#inf,RANGEKEYUNSET]
   892    000006:[f#12,SET-h#12,SET]
   893    000009:[x#15,SET-y#15,SET]
   894  
   895  build ext7
   896  range-key-del s x
   897  ----
   898  
   899  ingest ext7
   900  ----
   901  
   902  lsm
   903  ----
   904  6:
   905    000005:[a#11,RANGEKEYSET-c#inf,RANGEKEYSET]
   906    000004:[c#10,SET-e#10,SET]
   907    000008:[ee#14,RANGEKEYSET-eee#inf,RANGEKEYSET]
   908    000007:[eee#13,RANGEKEYUNSET-f#inf,RANGEKEYUNSET]
   909    000006:[f#12,SET-h#12,SET]
   910    000010:[s#16,RANGEKEYDEL-x#inf,RANGEKEYDEL]
   911    000009:[x#15,SET-y#15,SET]
   912  
   913  reset enable-split
   914  ----
   915  
   916  build ext10
   917  set a foo
   918  set e bar
   919  ----
   920  
   921  ingest ext10
   922  ----
   923  
   924  lsm
   925  ----
   926  6:
   927    000004:[a#10,SET-e#10,SET]
   928  
   929  # The below ingestion should split one existing file.
   930  
   931  build ext11
   932  set b foobar
   933  set d foobar
   934  ----
   935  
   936  ingest ext11
   937  ----
   938  
   939  lsm
   940  ----
   941  6:
   942    000006:[a#10,SET-a#10,SET]
   943    000005:[b#11,SET-d#11,SET]
   944    000007:[e#10,SET-e#10,SET]
   945  
   946  iter
   947  first
   948  next
   949  next
   950  next
   951  ----
   952  a: (foo, .)
   953  b: (foobar, .)
   954  d: (foobar, .)
   955  e: (bar, .)
   956  
   957  # This ingestion should not split any files due to data overlap.
   958  
   959  build ext12
   960  set c foobar
   961  set e baz
   962  ----
   963  
   964  ingest ext12
   965  ----
   966  
   967  lsm
   968  ----
   969  0.0:
   970    000008:[c#12,SET-e#12,SET]
   971  6:
   972    000006:[a#10,SET-a#10,SET]
   973    000005:[b#11,SET-d#11,SET]
   974    000007:[e#10,SET-e#10,SET]
   975  
   976  # The below ingestion should fall through one existing file and split another
   977  # file.
   978  
   979  build ext13
   980  set cc foo
   981  set ccc foooo
   982  ----
   983  
   984  ingest ext13
   985  ----
   986  
   987  lsm
   988  ----
   989  0.0:
   990    000008:[c#12,SET-e#12,SET]
   991  6:
   992    000006:[a#10,SET-a#10,SET]
   993    000010:[b#11,SET-b#11,SET]
   994    000009:[cc#13,SET-ccc#13,SET]
   995    000011:[d#11,SET-d#11,SET]
   996    000007:[e#10,SET-e#10,SET]
   997  
   998  iter
   999  seek-ge c
  1000  next
  1001  next
  1002  next
  1003  next
  1004  ----
  1005  c: (foobar, .)
  1006  cc: (foo, .)
  1007  ccc: (foooo, .)
  1008  d: (foobar, .)
  1009  e: (baz, .)
  1010  
  1011  # Ingestion splitting doesn't kick in at L0.
  1012  
  1013  build ext14
  1014  set d updated
  1015  set dd new
  1016  ----
  1017  
  1018  ingest ext14
  1019  ----
  1020  
  1021  lsm
  1022  ----
  1023  0.1:
  1024    000012:[d#14,SET-dd#14,SET]
  1025  0.0:
  1026    000008:[c#12,SET-e#12,SET]
  1027  6:
  1028    000006:[a#10,SET-a#10,SET]
  1029    000010:[b#11,SET-b#11,SET]
  1030    000009:[cc#13,SET-ccc#13,SET]
  1031    000011:[d#11,SET-d#11,SET]
  1032    000007:[e#10,SET-e#10,SET]
  1033  
  1034  iter
  1035  seek-lt d
  1036  next
  1037  next
  1038  next
  1039  next
  1040  ----
  1041  ccc: (foooo, .)
  1042  d: (updated, .)
  1043  dd: (new, .)
  1044  e: (baz, .)
  1045  .
  1046  
  1047  # Multi-sstable ingestion batches. This exercises logic to find the appropriate
  1048  # file to split for each newly ingested file, as we will be repeatedly splitting
  1049  # files into smaller virtual files.
  1050  
  1051  reset enable-split
  1052  ----
  1053  
  1054  build ext10
  1055  set a foo
  1056  set e bar
  1057  set g baz
  1058  ----
  1059  
  1060  ingest ext10
  1061  ----
  1062  
  1063  lsm
  1064  ----
  1065  6:
  1066    000004:[a#10,SET-g#10,SET]
  1067  
  1068  build ext11
  1069  set b foobar
  1070  set c foobar
  1071  ----
  1072  
  1073  build ext12
  1074  set cc foobar
  1075  set d foobar
  1076  ----
  1077  
  1078  # This ingestion should slide in the same gap between keys in ext10.
  1079  
  1080  ingest ext11 ext12
  1081  ----
  1082  
  1083  lsm
  1084  ----
  1085  6:
  1086    000007:[a#10,SET-a#10,SET]
  1087    000005:[b#11,SET-c#11,SET]
  1088    000006:[cc#12,SET-d#12,SET]
  1089    000008:[e#10,SET-g#10,SET]
  1090  
  1091  # A virtual sstable produced from an ingest split can be ingest split again.
  1092  
  1093  build ext13
  1094  set ee foooo
  1095  set f bar
  1096  ----
  1097  
  1098  ingest ext13
  1099  ----
  1100  
  1101  lsm
  1102  ----
  1103  6:
  1104    000007:[a#10,SET-a#10,SET]
  1105    000005:[b#11,SET-c#11,SET]
  1106    000006:[cc#12,SET-d#12,SET]
  1107    000010:[e#10,SET-e#10,SET]
  1108    000009:[ee#13,SET-f#13,SET]
  1109    000011:[g#10,SET-g#10,SET]
  1110  
  1111  reset enable-split
  1112  ----
  1113  
  1114  build ext10
  1115  set a foo
  1116  set e bar
  1117  set g baz
  1118  ----
  1119  
  1120  ingest ext10
  1121  ----
  1122  
  1123  lsm
  1124  ----
  1125  6:
  1126    000004:[a#10,SET-g#10,SET]
  1127  
  1128  build ext11
  1129  set b foobar
  1130  set c foobar
  1131  ----
  1132  
  1133  build ext12
  1134  set cc foobar
  1135  set d foobar
  1136  ----
  1137  
  1138  build ext13
  1139  set ee foooo
  1140  set f bar
  1141  ----
  1142  
  1143  # This ingestion should split ext10 twice, and land two files on one side
  1144  # of a key in it, and another file on another side of it.
  1145  
  1146  ingest ext11 ext12 ext13
  1147  ----
  1148  
  1149  lsm
  1150  ----
  1151  6:
  1152    000008:[a#10,SET-a#10,SET]
  1153    000005:[b#11,SET-c#11,SET]
  1154    000006:[cc#12,SET-d#12,SET]
  1155    000010:[e#10,SET-e#10,SET]
  1156    000007:[ee#13,SET-f#13,SET]
  1157    000011:[g#10,SET-g#10,SET]
  1158  
  1159  iter
  1160  first
  1161  next
  1162  next
  1163  next
  1164  next
  1165  next
  1166  next
  1167  next
  1168  next
  1169  next
  1170  ----
  1171  a: (foo, .)
  1172  b: (foobar, .)
  1173  c: (foobar, .)
  1174  cc: (foobar, .)
  1175  d: (foobar, .)
  1176  e: (bar, .)
  1177  ee: (foooo, .)
  1178  f: (bar, .)
  1179  g: (baz, .)
  1180  .