NoahStapp commented on code in PR #36961:
URL: https://github.com/apache/beam/pull/36961#discussion_r2581985634
##########
sdks/python/apache_beam/io/mongodbio.py:
##########
@@ -460,16 +457,15 @@ def _get_split_keys(
if self._range_is_not_splittable(start_pos, end_pos):
return []
- with MongoClient(self.uri, **self.spec) as client:
Review Comment:
Totally understand not wanting to make an implementation change on client
management, but I would offer a strong motivation to do so: performance.
Creating a new client for every operation has a much larger overhead than using
a single persistent client across all operations. Can you share the current
motivation for transient per-operation MongoClients?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]