[HZ-5405] [HZ-5419] Executor for Asyncio#790
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #790 +/- ##
==========================================
+ Coverage 94.41% 94.43% +0.02%
==========================================
Files 399 400 +1
Lines 26016 26079 +63
==========================================
+ Hits 24563 24629 +66
+ Misses 1453 1450 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # hazelcast/internal/asyncio_client.py
| self._invocation_service.invoke(invocation) | ||
| return invocation.future | ||
|
|
||
| async def _ainvoke_on_target( |
There was a problem hiding this comment.
method only called from one place, Executor._execute_on_member. why do you introduce yet another utility method like this instead of awaiting at the called method?
There was a problem hiding this comment.
It's similar to _ainvoke_on_partition: https://github.com/yuce/hazelcast-python-client/blob/4be241441bf1cc9e54a8bc03e4927986f32ef576/hazelcast/internal/asyncio_proxy/base.py#L94
The _invoke_on_partition method returns a Future, so if you call it in an async function, there's no linter check to make sure you called it with await. I introduced _ainvoke_target, so it is clear that it's an async function, and linter shows a warning if it wasn't called with await.
| except SchemaNotReplicatedError as e: | ||
| return await self._send_schema_and_retry(e, self.execute_on_members, members, task) | ||
|
|
||
| uuid = uuid4() |
There was a problem hiding this comment.
The uuid is unique for each call to each member at Java client(see https://github.com/hazelcast/hazelcast-mono/blob/d2d3c923d45982e80047954849a560dc85762821/hazelcast/hazelcast/src/main/java/com/hazelcast/client/impl/proxy/ClientExecutorServiceProxy.java#L511). Can you test and fix this same as Java?
There was a problem hiding this comment.
Fixed both asncore and asyncio code at: c7e6979
Straightforward port of Executor proxy, and its tests to asyncio