python-etcd icon indicating copy to clipboard operation
python-etcd copied to clipboard

lock.aquire fall into infinite loop

Open triStone opened this issue 7 years ago • 2 comments

If an EtcdException occurs in lock.py:122, the while loop will fall into an infinite loop. In my case, "The event in requested index is outdated and cleared" exception occurs in watch method which called at lock.py:122, that makes the lock._acquire method keep log the exception and try to watch the new event again and again. Is that a bug or I use the acquire method in a wrong way?

triStone avatar Dec 19 '17 01:12 triStone

In my opinion, the acquire function should throw an exception after timeout.

triStone avatar Dec 19 '17 03:12 triStone

Concur with this. We're having an issue where this loop is generating tens of thousands of unactionable events for our exception logger.

Via this comment and its responses, it appears that correct behavior is to restart the client and re-read configuration from scratch.

aawilson avatar Jan 28 '19 17:01 aawilson