github.com/cockroachdb/pebble@v1.1.2/replay/testdata/collect/start_stop (about)

     1  # This test exercises starting and stopping the collector twice.
     2  
     3  create-manifest filenum=000001
     4  ----
     5  
     6  start
     7  ----
     8  
     9  ingest
    10  000002
    11  000003
    12  000004
    13  ----
    14  created src/000002.sst
    15  created src/000003.sst
    16  created src/000004.sst
    17  [JOB 0] ingested L0:000002 (10KB), L0:000003 (10KB), L0:000004 (10KB)
    18  
    19  
    20  wait
    21  ----
    22  dst:
    23    000002.sst
    24    000003.sst
    25    000004.sst
    26    MANIFEST-000001
    27  
    28  clean
    29  src/000003.sst
    30  ----
    31  
    32  stop
    33  ----
    34  
    35  flush
    36  000005
    37  000006
    38  ----
    39  created src/000005.sst
    40  created src/000006.sst
    41  [JOB 0] flushed 1 memtable (100B) to L0 [000005 000006] (20KB), in 0.1s (0.1s total), output rate 200KB/s
    42  
    43  # dst/ should now have the original insgested files (00000{2-4}.sst) and the
    44  # manifest, but not the more-recently flushed files (00000{5-6}.sst). src/
    45  # should not have 000003.sst, because it was cleaned (and collected).
    46  
    47  ls src dst
    48  ----
    49  src:
    50    000002.sst
    51    000004.sst
    52    000005.sst
    53    000006.sst
    54    MANIFEST-000001
    55  dst:
    56    000002.sst
    57    000003.sst
    58    000004.sst
    59    MANIFEST-000001
    60  
    61  start
    62  ----
    63  
    64  # Cleaning one of the files created by the flush while we were not collecting
    65  # should result in its immediate removal.
    66  
    67  clean
    68  src/000005.sst
    69  ----
    70  
    71  ls src
    72  ----
    73  src:
    74    000002.sst
    75    000004.sst
    76    000006.sst
    77    MANIFEST-000001
    78  
    79  flush
    80  000007
    81  000008
    82  ----
    83  created src/000007.sst
    84  created src/000008.sst
    85  [JOB 0] flushed 1 memtable (100B) to L0 [000007 000008] (20KB), in 0.1s (0.1s total), output rate 200KB/s
    86  
    87  wait
    88  ----
    89  dst:
    90    000002.sst
    91    000003.sst
    92    000004.sst
    93    000007.sst
    94    000008.sst
    95    MANIFEST-000001
    96  
    97  stop
    98  ----