github.com/cockroachdb/pebble@v1.1.2/record/testdata/rotation (about) 1 rotate 100 2 ---- 3 last-snapshot-size: 100 4 size-since-last-snapshot: 0 5 6 add 10 7 ---- 8 last-snapshot-size: 100 9 size-since-last-snapshot: 10 10 11 # We should only rotate if the next snapshot is much smaller. 12 should-rotate 100 13 ---- 14 false 15 16 should-rotate 5 17 ---- 18 true 19 20 add 50 21 ---- 22 last-snapshot-size: 100 23 size-since-last-snapshot: 60 24 25 add 50 26 ---- 27 last-snapshot-size: 100 28 size-since-last-snapshot: 110 29 30 add 50 31 ---- 32 last-snapshot-size: 100 33 size-since-last-snapshot: 160 34 35 # We exceeded the last snapshot size, we should rotate regardless. 36 should-rotate 1 37 ---- 38 true 39 40 should-rotate 1000 41 ---- 42 true 43 44 add 1 45 ---- 46 last-snapshot-size: 100 47 size-since-last-snapshot: 161 48 49 rotate 10 50 ---- 51 last-snapshot-size: 10 52 size-since-last-snapshot: 1 53 54 add 5 55 ---- 56 last-snapshot-size: 10 57 size-since-last-snapshot: 6 58 59 should-rotate 5 60 ---- 61 true 62 63 should-rotate 100 64 ---- 65 false