Skip to content

PYTHON-4730 Failing Async Bulk Tests #1831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

sleepyStick
Copy link
Contributor

@sleepyStick sleepyStick commented Sep 4, 2024

Honestly not sure what changed since this PR that would cause the tests to fail, because they weren't failing when I merged them...?

@ShaneHarvey
Copy link
Member

Looks like evergreen never actually ran on the final commit in #1827 so that would explain why the tests "passed".

@sleepyStick
Copy link
Contributor Author

ahhh that makes sense, sorry for not noticing that earlier!

@ShaneHarvey
Copy link
Member

 [2024/09/04 16:20:57.567] FAILURE: pymongo.errors.ServerSelectionTimeoutError: localhost:27017: connection closed (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 30s, Topology Description: <TopologyDescription id: 66d8ea2454b87254ccbe234d, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: connection closed (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>]> ()
 [2024/09/04 16:20:57.567] self = <test.asynchronous.test_bulk.AsyncTestBulkWriteConcern testMethod=test_write_concern_failure_ordered>
 [2024/09/04 16:20:57.567]     @async_client_context.require_replica_set
 [2024/09/04 16:20:57.567]     @async_client_context.require_secondaries_count(1)
 [2024/09/04 16:20:57.567]     async def test_write_concern_failure_ordered(self):
 [2024/09/04 16:20:57.567]         # Ensure we don't raise on wnote.
 [2024/09/04 16:20:57.567]         coll_ww = self.coll.with_options(write_concern=WriteConcern(w=self.w))
 [2024/09/04 16:20:57.567]         result = await coll_ww.bulk_write([DeleteOne({"something": "that does no exist"})])
 [2024/09/04 16:20:57.567]         self.assertTrue(result.acknowledged)
 [2024/09/04 16:20:57.567]     
 [2024/09/04 16:20:57.567]         requests: list[Any] = [InsertOne({"a": 1}), InsertOne({"a": 2})]
 [2024/09/04 16:20:57.567]         # Replication wtimeout is a 'soft' error.
 [2024/09/04 16:20:57.567]         # It shouldn't stop batch processing.
 [2024/09/04 16:20:57.567]         try:
 [2024/09/04 16:20:57.567] >           await self.cause_wtimeout(requests, ordered=True)
 [2024/09/04 16:20:57.567] test/asynchronous/test_bulk.py:991: 
 [2024/09/04 16:20:57.567] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 [2024/09/04 16:20:57.567] test/asynchronous/test_bulk.py:971: in cause_wtimeout
 [2024/09/04 16:20:57.567]     await self.secondary.admin.command("configureFailPoint", "rsSyncApplyStop", mode="alwaysOn")
 [2024/09/04 16:20:57.567] pymongo/_csot.py:120: in csot_wrapper
 [2024/09/04 16:20:57.567]     return func(self, *args, **kwargs)
 [2024/09/04 16:20:57.567] pymongo/synchronous/database.py:904: in command
 [2024/09/04 16:20:57.567]     with self._client._conn_for_reads(read_preference, session, operation=command_name) as (
 [2024/09/04 16:20:57.567] pymongo/synchronous/mongo_client.py:1675: in _conn_for_reads
 [2024/09/04 16:20:57.567]     server = self._select_server(read_preference, session, operation)
 [2024/09/04 16:20:57.567] pymongo/synchronous/mongo_client.py:1623: in _select_server
 [2024/09/04 16:20:57.567]     server = topology.select_server(
 [2024/09/04 16:20:57.567] pymongo/synchronous/topology.py:396: in select_server
 [2024/09/04 16:20:57.567]     server = self._select_server(
 [2024/09/04 16:20:57.567] pymongo/synchronous/topology.py:374: in _select_server
 [2024/09/04 16:20:57.567]     servers = self.select_servers(
 [2024/09/04 16:20:57.567] pymongo/synchronous/topology.py:281: in select_servers
 [2024/09/04 16:20:57.567]     server_descriptions = self._select_servers_loop(
 [2024/09/04 16:20:57.567] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 [2024/09/04 16:20:57.567] self = <Topology <TopologyDescription id: 66d8ea2454b87254ccbe234d, topology_type: Single, servers: [<ServerDescription ('loc...localhost:27017: connection closed (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>]>>

self.secondary is mistakenly created as a sync MongoClient instead of AsyncMongoClient.

@ShaneHarvey
Copy link
Member

ShaneHarvey commented Sep 5, 2024

Totally not your fault. Evergreen must have failed to schedule the PR run somehow. That almost never happens so it's not surprising that we missed it.

@sleepyStick
Copy link
Contributor Author

good eye! I've been trying to figure out what went wrong for the better part of the last hour or so! >.< thanks!

@blink1073
Copy link
Member

Yeah EVG had an outage today

@sleepyStick sleepyStick marked this pull request as ready for review September 5, 2024 16:04
@sleepyStick sleepyStick merged commit 2742a00 into mongodb:master Sep 5, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants