Skip to content
Open
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
7 changes: 5 additions & 2 deletions flow/connectors/mongo/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,13 @@
}).
// always use compression
SetCompressors([]string{"zstd", "snappy"}).
// always use majority read concern for correctness
SetReadConcern(readconcern.Majority()).
SetDialer(&meteredDialer)

// read concern could be set in the connection string with "readConcernLevel=[local|available|majority|...]"

Check failure on line 137 in flow/connectors/mongo/mongo.go

View workflow job for this annotation

GitHub Actions / lint

File is not properly formatted (gci)
if connStr.ReadConcernLevel == "" {
clientOptions.SetReadConcern(readconcern.Majority())
}

switch config.ReadPreference {
case protos.ReadPreference_PRIMARY:
clientOptions.SetReadPreference(readpref.Primary())
Expand Down
Loading