Skip to content

Commit

Permalink
Hackily skip the config database to avoid permissions errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
edanaher committed Sep 16, 2020
1 parent 3f6ab52 commit 460a646
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gtm.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,10 @@ retry:
for n, opIds := range ns {
var parts = strings.SplitN(n, ".", 2)
db, col := parts[0], parts[1]
// Skip config database, since we don't have permissions
if db == "config" {
continue
}
sel := bson.M{"_id": bson.M{"$in": opIds}}
collection := client.Database(db).Collection(col)
cursor, err := collection.Find(context.Background(), sel)
Expand Down

0 comments on commit 460a646

Please sign in to comment.