Skip to content

Commit 6265f2e

Browse files
authored
Quieten transient error (#724)
1 parent a39fa24 commit 6265f2e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

storage/posix/antispam/badger.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"errors"
2424
"fmt"
2525
"iter"
26+
"os"
2627
"sync/atomic"
2728
"time"
2829

@@ -261,7 +262,12 @@ func (f *follower) Follow(ctx context.Context, lr tessera.LogReader) {
261262
// Our view of the log is out of date, update it
262263
logSize, err = lr.IntegratedSize(ctx)
263264
if err != nil {
264-
workDone = true
265+
if errors.Is(err, os.ErrNotExist) {
266+
// The log probably just hasn't completed its first integration yet, so break out of here
267+
// and go back to sleep for a bit to avoid spamming errors into the log and scaring operators.
268+
workDone = false
269+
return nil
270+
}
265271
return fmt.Errorf("populate: IntegratedSize(): %v", err)
266272
}
267273
switch {

0 commit comments

Comments
 (0)