Skip to content

Commit 85cdd0d

Browse files
authored
Tap: bugfix for desynchronized repos (#1336)
This fixes the issue that was getting repos into a "desynchronized" state. I was accidentally using `r.Commit`, not realizing that it created a new commit, not return the existing commit details. This would cause us to store & compare incorrect, locally-generated revs rather than the rev from the commit message and subsequently end up skipping valid commits, thinking they were an old rev. Resolves #1315
2 parents b98f898 + 7852008 commit 85cdd0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/tap/firehose.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,15 @@ func (fp *FirehoseProcessor) validateCommitAndFilterOps(ctx context.Context, evt
187187
}
188188
}
189189

190-
repoCommit, err := r.Commit()
190+
dataCid, err := r.MST.RootCID()
191191
if err != nil {
192192
return nil, err
193193
}
194194

195195
commit := &Commit{
196196
Did: evt.Repo,
197-
Rev: repoCommit.Rev,
198-
DataCid: repoCommit.Data.String(),
197+
Rev: evt.Rev,
198+
DataCid: dataCid.String(),
199199
Ops: parsedOps,
200200
}
201201

0 commit comments

Comments
 (0)