diff --git a/plugins/database/mongodb/mongodb.go b/plugins/database/mongodb/mongodb.go index 61ca9c51bf5d..9f338a152a2f 100644 --- a/plugins/database/mongodb/mongodb.go +++ b/plugins/database/mongodb/mongodb.go @@ -165,6 +165,9 @@ func (m *MongoDB) RenewUser(ctx context.Context, statements dbplugin.Statements, // RevokeUser drops the specified user from the authentication database. If none is provided // in the revocation statement, the default "admin" authentication database will be assumed. func (m *MongoDB) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error { + m.Lock() + defer m.Unlock() + statements = dbutil.StatementCompatibilityHelper(statements) session, err := m.getConnection(ctx)