Open jyoon17 opened 7 years ago
Hi @jyoon17 interesting - it does seem like we could add some lock delay info as feedback to make the wait less of an open loop thing.
Adding the feedback could be tricky though, because the leader maintains the lock delay timers, so you'd have to read that in a consistent way.
Please see #1008 (https://github.com/hashicorp/consul/pull/1008#issuecomment-110226523)
Let's assume that the first agent releases the lock somewhere between 3 and 4. Then agent 2 and 3 see a blank session on the key which leads to make them sleep 5 seconds to avoid a hot-loop.
Would it be better to try to acquire a lock again instead of a long sleep for nothing? Or it would be much better if a server could provide additional info of key which is in a lock-delay state. A blank session seems too vague.