github.com/cockroachdb/pebble@v1.1.2/testdata/concurrent_excise (about) 1 2 reset 3 ---- 4 5 switch 1 6 ---- 7 ok 8 9 batch 10 set d foo 11 set e bar 12 ---- 13 14 flush 15 ---- 16 17 compact a-z 18 ---- 19 ok 20 21 switch 2 22 ---- 23 ok 24 25 batch 26 set c fooz 27 set f foobar 28 ---- 29 30 flush 31 ---- 32 33 compact a-z 34 ---- 35 ok 36 37 batch 38 set d foobar 39 ---- 40 41 flush 42 ---- 43 44 lsm 45 ---- 46 0.0: 47 000007:[d#12,SET-d#12,SET] 48 6: 49 000005:[c#10,SET-f#11,SET] 50 51 compact a-z block=c1 52 ---- 53 spun off in separate goroutine 54 55 iter 56 first 57 next 58 next 59 next 60 next 61 ---- 62 c: (fooz, .) 63 d: (foobar, .) 64 f: (foobar, .) 65 . 66 . 67 68 # This excise should cancel the in-flight compaction, causing it to error out 69 # below. The eventually file-only snapshot should go through because it's not 70 # waiting on any keys in memtables 71 72 file-only-snapshot s1 73 c e 74 ---- 75 ok 76 77 replicate 1 2 b e 78 ---- 79 replicated 1 shared SSTs 80 81 unblock c1 82 ---- 83 ok 84 85 wait-for-file-only-snapshot s1 86 ---- 87 ok 88 89 lsm 90 ---- 91 6: 92 000010:[d#13,SET-d#13,SET] 93 000011:[f#11,SET-f#11,SET] 94 95 compact a-z 96 ---- 97 ok 98 99 wait-for-background-error 100 ---- 101 pebble: compaction cancelled by a concurrent operation, will retry compaction 102 103 iter 104 first 105 next 106 next 107 next 108 next 109 ---- 110 d: (foo, .) 111 f: (foobar, .) 112 . 113 . 114 . 115 116 batch 117 set d fo 118 set ee foobar 119 set f3 something 120 ---- 121 122 flush 123 ---- 124 125 compact a-z 126 ---- 127 ok 128 129 switch 1 130 ---- 131 ok 132 133 # The below file-only snapshot should be errored out by the concurrent excise. 134 135 batch 136 set d something 137 ---- 138 139 flush 140 ---- 141 142 batch 143 set dd memory 144 ---- 145 146 file-only-snapshot s2 147 c e 148 ---- 149 ok 150 151 iter snapshot=s2 152 first 153 next 154 next 155 next 156 ---- 157 d: (something, .) 158 dd: (memory, .) 159 e: (bar, .) 160 . 161 162 replicate 2 1 c dd 163 ---- 164 replicated 1 shared SSTs 165 166 wait-for-file-only-snapshot s2 167 ---- 168 pebble: snapshot excised before conversion to file-only snapshot 169 170 iter snapshot=s2 171 first 172 next 173 next 174 next 175 ---- 176 pebble: snapshot excised before conversion to file-only snapshot