bookkeeper
bookkeeper copied to clipboard
Invoke WriteSet#get() after recycled
BUG REPORT
Describe the bug
While client reads entry(s),bookie will send read request to node in sequence, and WriteSet is recycled when we receive a successfully response, but SequenceReadRequest will try to registerSlowBookie according writeSet and nextReplicaIndexToReadFrom later, unfortunately the WriteSet is already recycled and a IndexOutOfBoundsException is raised unexpected.
To Reproduce
Steps to reproduce the behavior: Assume we declare a configuration like this, ensembleSize 4, writeQuorumSize 2, ackQuorumSize 2
- Client call LedgerHandle#readEntry, and assume we will read (0,1) in ensemble
- if bookieIndex 0 read failed, we continue read from 1 and read successfully
- Invoke SequenceReadRequest#complete and recycle WriteSet
- Then try to registerSlowBookies but the WriteSet is recycled, error is occurs.
Hope I have make it sense and look forward to your reply soon, thanks.