mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

ReleaseLockTo should not release the lock on the WAL segment that is right before the given index. When restarting etcd, etcd needs to read from the WAL segment that has a smaller index than the snapshot index. The correct behavior is that ReleaseLockTo releases the locks w is holding so that w only holds one lock that has an index smaller than the given index.