github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/replay/testdata/collect/manifest_copying (about) 1 # When collection begins, it should start from the most recent manifest. 2 3 create-manifest filenum=000001 4 ---- 5 6 create-manifest filenum=000002 7 ---- 8 9 # Since collection hasn't started yet, cleaning the old manifest should 10 # immediately remove it. 11 12 clean 13 src/MANIFEST-000001 14 ---- 15 16 ls src 17 ---- 18 src: 19 MANIFEST-000002 20 21 start 22 ---- 23 24 stat src/MANIFEST-000002 25 ---- 26 src/MANIFEST-000002: 27 size: 100 28 29 flush 30 000003 31 ---- 32 created src/000003.sst 33 [JOB 0] flushed 1 memtable (100B) to L0 [000003] (10KB), in 0.1s (0.1s total), output rate 100KB/s 34 35 wait 36 ---- 37 dst: 38 000003.sst 39 MANIFEST-000002 40 41 # The new file should have a larger size than it did when we stat'd the src 42 # manifest because a version edit should've been appended by the flush, and 43 # copied while copying the flushed sstables. 44 45 stat dst/MANIFEST-000002 46 ---- 47 dst/MANIFEST-000002: 48 size: 125 49 50 cmp-files src/MANIFEST-000002 dst/MANIFEST-000002 51 ---- 52 equal 53 54 # Test a manifest rotation. 55 56 create-manifest filenum=000004 57 ---- 58 59 flush 60 000005 61 000006 62 ---- 63 created src/000005.sst 64 created src/000006.sst 65 [JOB 0] flushed 1 memtable (100B) to L0 [000005 000006] (20KB), in 0.1s (0.1s total), output rate 200KB/s 66 67 wait 68 ---- 69 dst: 70 000003.sst 71 000005.sst 72 000006.sst 73 MANIFEST-000002 74 MANIFEST-000004 75 76 cmp-files src/MANIFEST-000004 dst/MANIFEST-000004 77 ---- 78 equal 79 80 stop 81 ----