Skip to content

Commit

Permalink
feat: panic when snapshot marker order corrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
erayarslan committed Jan 25, 2025
1 parent 3bbd4e7 commit 22dfa56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion couchbase/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package couchbase

import (
"context"
"fmt"
"reflect"
"time"

Expand Down Expand Up @@ -185,7 +186,9 @@ func (so *observer) IsInSnapshotMarker(seqNo uint64) bool {
seqNo >= so.currentSnapshot.StartSeqNo && seqNo <= so.currentSnapshot.EndSeqNo

if !isIn {
logger.Log.Warn("seqNo not in snapshot: %v", seqNo)
err := fmt.Errorf("seqNo not in snapshot: %v, vbID: %v", seqNo, so.vbID)
logger.Log.Error("error while snapshot marker check, err: %v", err)
panic(err)
}

return isIn
Expand Down

0 comments on commit 22dfa56

Please sign in to comment.