github.com/cockroachdb/pebble@v1.1.1-0.20240513155919-3622ade60459/testdata/format_major_version_split_user_key_migration (about) 1 define 2 L1 3 d.SET.110:d e.SET.140:e 4 ---- 5 1: 6 000004:[d#110,SET-e#140,SET] seqnums:[110-140] points:[d#110,SET-e#140,SET] 7 8 reopen 9 ---- 10 OK 11 12 # The current public Pebble interface offers no way of constructing a multi-file 13 # atomic compaction unit, so use the force-ingest command to force an ingestion 14 # into L1. 15 16 build cd 17 set c c 18 set d d 19 ---- 20 21 force-ingest paths=(cd) level=1 22 ---- 23 1: 24 000008:[c#141,SET-d#141,SET] seqnums:[141-141] points:[c#141,SET-d#141,SET] 25 000004:[d#110,SET-e#140,SET] seqnums:[110-140] points:[d#110,SET-e#140,SET] 26 27 format-major-version 28 ---- 29 005 30 31 marked-file-count 32 ---- 33 0 files marked for compaction 34 35 ratchet-format-major-version 006 36 ---- 37 38 format-major-version 39 ---- 40 006 41 42 # Upgrading to format major version 006 should've marked files for compaction. 43 44 marked-file-count 45 ---- 46 2 files marked for compaction 47 48 reopen 49 ---- 50 OK 51 52 format-major-version 53 ---- 54 006 55 56 # Ensure the files previously marked for compaction are still marked for 57 # compaction. 58 59 marked-file-count 60 ---- 61 2 files marked for compaction 62 63 disable-automatic-compactions false 64 ---- 65 66 # Ratcheting to 007 should force compaction of any files still marked for 67 # compaction. 68 69 ratchet-format-major-version 007 70 ---- 71 [JOB 100] compacted(rewrite) L1 [000008 000004] (1.3KB) Score=0.00 + L1 [] (0B) Score=0.00 -> L1 [000013] (649B), in 1.0s (2.0s total), output rate 649B/s 72 73 format-major-version 74 ---- 75 007 76 77 lsm 78 ---- 79 1: 80 000013:[c#0,SET-e#0,SET] 81 82 # Reset to a new LSM. 83 84 define 85 L1 86 b.SET.0:b c.SET.5:c 87 L1 88 m.SET.0:m l.SET.5:l 89 L1 90 x.SET.0:x y.SET.5:y 91 ---- 92 1: 93 000004:[b#0,SET-c#5,SET] seqnums:[0-5] points:[b#0,SET-c#5,SET] 94 000005:[l#5,SET-m#0,SET] seqnums:[0-5] points:[l#5,SET-m#0,SET] 95 000006:[x#0,SET-y#5,SET] seqnums:[0-5] points:[x#0,SET-y#5,SET] 96 97 build ab 98 set a a 99 set b b 100 ---- 101 102 build wx 103 set w w 104 set x x 105 ---- 106 107 force-ingest paths=(ab, wx) level=1 108 ---- 109 1: 110 000007:[a#10,SET-b#10,SET] seqnums:[10-10] points:[a#10,SET-b#10,SET] 111 000004:[b#0,SET-c#5,SET] seqnums:[0-5] points:[b#0,SET-c#5,SET] 112 000005:[l#5,SET-m#0,SET] seqnums:[0-5] points:[l#5,SET-m#0,SET] 113 000008:[w#11,SET-x#11,SET] seqnums:[11-11] points:[w#11,SET-x#11,SET] 114 000006:[x#0,SET-y#5,SET] seqnums:[0-5] points:[x#0,SET-y#5,SET] 115 116 format-major-version 117 ---- 118 005 119 120 ratchet-format-major-version 006 121 ---- 122 123 format-major-version 124 ---- 125 006 126 127 marked-file-count 128 ---- 129 4 files marked for compaction 130 131 disable-automatic-compactions false 132 ---- 133 134 ratchet-format-major-version 007 135 ---- 136 [JOB 100] compacted(rewrite) L1 [000007 000004] (1.3KB) Score=0.00 + L1 [] (0B) Score=0.00 -> L1 [000010] (649B), in 1.0s (2.0s total), output rate 649B/s 137 [JOB 100] compacted(rewrite) L1 [000008 000006] (1.3KB) Score=0.00 + L1 [] (0B) Score=0.00 -> L1 [000011] (649B), in 1.0s (2.0s total), output rate 649B/s 138 139 lsm 140 ---- 141 1: 142 000010:[a#0,SET-c#0,SET] 143 000005:[l#5,SET-m#0,SET] 144 000011:[w#0,SET-y#0,SET] 145 146 format-major-version 147 ---- 148 007