diff options
Diffstat (limited to 'src/mongo/db/s/flush_database_cache_updates_command.cpp')
-rw-r--r-- | src/mongo/db/s/flush_database_cache_updates_command.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/s/flush_database_cache_updates_command.cpp b/src/mongo/db/s/flush_database_cache_updates_command.cpp index deae485cca9..362c45dc8e8 100644 --- a/src/mongo/db/s/flush_database_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_database_cache_updates_command.cpp @@ -121,6 +121,12 @@ public: { AutoGetDb autoDb(opCtx, name, MODE_IS); + if (!autoDb.getDb()) { + uasserted(ErrorCodes::NamespaceNotFound, + str::stream() << "Can't issue _flushDatabaseCacheUpdates on the database " + << name + << " because it does not exist on this shard."); + } // If the primary is in the critical section, secondaries must wait for the commit to // finish on the primary in case a secondary's caller has an afterClusterTime inclusive |