github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/testdata/iter_histories/errors (about) 1 reset 2 ---- 3 4 batch commit 5 set a a 6 set b b 7 set c c 8 set d d 9 ---- 10 committed 4 keys 11 12 # Scan forward 13 14 combined-iter 15 seek-ge a 16 next 17 next 18 next 19 next 20 ---- 21 a: (a, .) 22 b: (b, .) 23 c: (c, .) 24 d: (d, .) 25 . 26 27 reopen 28 ---- 29 30 combined-iter 31 first 32 next 33 next 34 next 35 next 36 ---- 37 a: (a, .) 38 b: (b, .) 39 c: (c, .) 40 d: (d, .) 41 . 42 43 reopen enable-table-stats=false inject-errors=((ErrInjected (And Reads (PathMatch "*.sst") (OnIndex 4)))) 44 ---- 45 46 combined-iter 47 first 48 first 49 next 50 next 51 next 52 next 53 ---- 54 err=pebble: backing file 000004 error: injected error 55 a: (a, .) 56 b: (b, .) 57 c: (c, .) 58 d: (d, .) 59 . 60 61 # Regression test for #2994. 62 # 63 # Previously, an error while loading an L0 sstable's range key block could 64 # result in an iterator that would always return the same error. Now, the IO is 65 # deferred to the first seek. If a seek encounters an IO error, re-seeking the 66 # iterator should re-attempt the failed IO operation, potentially succeeding if 67 # the IO error was transient. 68 69 define auto-compactions=off 70 L0 71 a.SET.9:a 72 rangekey:c-d:{(#0,RANGEKEYSET,@1,foo)} 73 e@2.SET.2:e@2 74 ---- 75 0.0: 76 000004:[a#9,SET-e@2#2,SET] 77 78 layout filename=000004.sst 79 ---- 80 0 data (38) 81 43 index (35) 82 83 range-key (29) 83 117 properties (645) 84 767 meta-index (57) 85 829 footer (53) 86 882 EOF 87 88 # Inject an error on the first `ReadAt` call on 000004.sst's range key block 89 # (which is at offset 83). 90 91 reopen auto-compactions=off enable-table-stats=false inject-errors=((ErrInjected (And (PathMatch "000004.sst") (OpFileReadAt 83) (OnIndex 0)))) 92 ---- 93 94 combined-iter 95 first 96 first 97 ---- 98 err=injected error 99 a: (a, .)