diff options
author | Christopher Caplinger <christopher.caplinger@mongodb.com> | 2023-04-26 19:01:38 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-26 20:49:54 +0000 |
commit | 518f3df1276fa9c396b1384554e69dd96e633b6c (patch) | |
tree | 0d4c50c89004e58a690c95e9f8b34a5f8c2003c1 /buildscripts/resmokelib | |
parent | 4d541df08dde02eb967c8f2720e1e46beb88ff9c (diff) | |
download | mongo-518f3df1276fa9c396b1384554e69dd96e633b6c.tar.gz |
SERVER-76358: Retry drop_database cmds in Tenant Migration hook
Diffstat (limited to 'buildscripts/resmokelib')
-rw-r--r-- | buildscripts/resmokelib/testing/hooks/tenant_migration.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/testing/hooks/tenant_migration.py b/buildscripts/resmokelib/testing/hooks/tenant_migration.py index c61eeeb02da..a629d1206dc 100644 --- a/buildscripts/resmokelib/testing/hooks/tenant_migration.py +++ b/buildscripts/resmokelib/testing/hooks/tenant_migration.py @@ -9,6 +9,7 @@ import uuid from bson.binary import Binary, UUID_SUBTYPE from pymongo.errors import OperationFailure, PyMongoError +from functools import partial from buildscripts.resmokelib import errors from buildscripts.resmokelib.testing.fixtures import tenant_migration @@ -599,7 +600,7 @@ class _TenantMigrationThread(threading.Thread): for database in res["databases"]: db_name = database["name"] if db_name.startswith(self._tenant_id + "_"): - recipient_client.drop_database(db_name) + with_naive_retry(partial(recipient_client.drop_database, db_name)) except PyMongoError as err: self.logger.exception( f"Error dropping databases for tenant '{self._tenant_id}' on replica set '{migration_opts.get_recipient_name()}': '{str(err)}'." |