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

Fix https://github.com/coreos/etcd/issues/7526. When resetting `bolt.Tx` in `defrag` and `batchTxBuffered.commit` operation, we do not hold `readTx` lock, so the inflight range requests can trigger panic in `mvcc.Range` paths. This fixes by moving mutexes out and hold it while resetting the `readTx`. Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>