Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

refresh the session when the iter errors #398

Merged
merged 1 commit into from
Aug 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
### Bugfixes
- when using MongoDB as a source with tailing enabled and namespace filtering, it was possible for documents
from others collections to be sent down the pipeline, fixed via [#386](https://github.com/compose/transporter/pull/386)
- if transporter lost connection to MongoDB while tailing the oplog, the connection never successfully reconnected, fixed via [#398](https://github.com/compose/transporter/pull/398)

## v0.3.1 [2017-03-24]

Expand Down
2 changes: 1 addition & 1 deletion adaptor/mongodb/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (r *Reader) tailCollection(c string, mgoSession *mgo.Session, oplogTime bso
}
if iter.Err() != nil {
log.With("path", db).Errorf("error tailing oplog, %s", iter.Err())
// return adaptor.NewError(adaptor.CRITICAL, m.path, fmt.Sprintf("MongoDB error (error reading collection %s)", iter.Err()), nil)
mgoSession.Refresh()
}

query = bson.M{"ts": bson.M{"$gte": oplogTime}}
Expand Down