Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Termina1 committed Dec 24, 2024
1 parent dada1b8 commit ca98cf8
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,18 +482,22 @@ func (sync *Syncer) FeedDiffVV(ctx context.Context) (vv protocol.Records, err er
vv = append(vv, sync.vpack)
sync.vpack = nil
closediterators := true
err = sync.ffit.Close()
if err != nil {
closediterators = false
sync.log.ErrorCtx(sync.logCtx(ctx), "failed closing ffit", "err", err)
if sync.ffit != nil {
err = sync.ffit.Close()
if err != nil {
closediterators = false
sync.log.ErrorCtx(sync.logCtx(ctx), "failed closing ffit", "err", err)
}
sync.ffit = nil
}
sync.ffit = nil
err = sync.vvit.Close()
if err != nil {
closediterators = false
sync.log.ErrorCtx(sync.logCtx(ctx), "failed closing vvit", "err", err)
if sync.vvit != nil {
err = sync.vvit.Close()
if err != nil {
closediterators = false
sync.log.ErrorCtx(sync.logCtx(ctx), "failed closing vvit", "err", err)
}
sync.vvit = nil
}
sync.vvit = nil
if closediterators {
OpenedIterators.WithLabelValues(sync.Name).Set(0)
}
Expand Down

0 comments on commit ca98cf8

Please sign in to comment.