[HZ-5434] FencedLock for Asyncio#818
Conversation
# Conflicts: # hazelcast/internal/asyncio_client.py
# Conflicts: # hazelcast/asyncio/__init__.py
# Conflicts: # hazelcast/asyncio/__init__.py
# Conflicts: # hazelcast/asyncio/__init__.py # hazelcast/internal/asyncio_proxy/cp_manager.py
# Conflicts: # hazelcast/asyncio/__init__.py # hazelcast/internal/asyncio_proxy/cp_manager.py
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #818 +/- ##
==========================================
- Coverage 94.22% 94.14% -0.09%
==========================================
Files 411 412 +1
Lines 27427 27601 +174
==========================================
+ Hits 25844 25984 +140
- Misses 1583 1617 +34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
How are you going to protect lock ownership without thread id? There will be concurrent runs, right? |
The lock is reentrant for lock attempts with the same client, similar to the Node.js client, so data races will happen with operations that uses the same client. |
Ported
FencedLockproxy to asyncio.The asyncore variant uses actual thread IDs to disable re-entrancy.
That's not useful with the asyncio variant, so currently the thread ID
0is used when necessary.I've omitted docs that refer to threads, and tests that use threads.
I'll push another PR to add those after lock context implementation.