FileDriver is not support multiple process
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tooz |
Fix Released
|
High
|
zhangsong |
Bug Description
RT
I try to use FileDriver in a machine.
I write a simple test code.
It's function is: get_coordinator via FileDriver -> join a group -> sleep 10 seconds -> coordinator.stop()
1. I execute the script, after join_group, it will sleep(10). We called this process P1.
2. During the P1 execute time.sleep(10), I re-execute the same script we called P2.
Then I find that: P2 will be blocked at join a group until the P1 finished
I think this is a bug.
Here is my test code:
=======
import time
import tooz
import uuid
from tooz import coordination
driver_url = "file:/
my_id = str(uuid.uuid4())
group_id = "test_group"
coordinator = coordination.
coordinator.start()
while True:
try:
join_req = coordinator.
print("join the group:%s" % group_id)
break
except tooz.coordinati
raise
except tooz.coordinati
try:
except tooz.coordinati
pass
except tooz.coordinati
print("join the group:%s failed for:%s" % (group_id, err))
print("start to sleep 10 secs")
time.sleep(10)
coordinator.stop()
=======
BTW: tooz version: 1.48.0
Changed in python-tooz: | |
assignee: | nobody → zhangsong (zhangsong) |
Yes, looks like a bug in FileLock to me.