Dear MongoDB experts,
I’ve been using local deployment for testing and am occasionally seeing the following error in my tests:
````````E pymongo.errors.OperationFailure: Error connecting to Search Index Management service., full error: {‘ok’: 0.0, ‘errmsg’: ‘Error connecting to Search Index Management service.’, ‘code’: 125, ‘codeName’: ‘CommandFailed’, ‘$clusterTime’: {‘clusterTime’: Timestamp(1709934526, 11), ‘signature’: {‘hash’: b’\x13\xda\xce\x9c&>e\xc8\xcf*%\xee\xc6T[\x142\x99\xc0:', ‘keyId’: 7344112858881327110}}, ‘operationTime’: Timestamp(1709934526, 11)}`
This happens when trying to setup a search index on a newly initialized database in local deployment:
python3.11/site-packages/pymongo/collection.py:2435: in create_search_index
return self.create_search_indexes([model], session, comment, **kwargs)[0]
python3.11/site-packages/pymongo/collection.py:2476: in create_search_indexes
resp = self._command(
python3.11/site-packages/pymongo/collection.py:308: in _command
return conn.command(
python3.11/site-packages/pymongo/helpers.py:322: in inner
return func(*args, **kwargs)
python3.11/site-packages/pymongo/pool.py:968: in command
return command(
python3.11/site-packages/pymongo/network.py:192: in command
helpers._check_command_response(
This seems non-deterministic and re-running the same test will not always encounter this issue. I wonder if there is some delay or error in initialization this service in the local deployment. Is there any advice on how to solve or avoid this?