bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

Invoke WriteSet#get() after recycled

Open ytong01 opened this issue 1 month ago • 0 comments

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

  1. Client call LedgerHandle#readEntry, and assume we will read (0,1) in ensemble
  2. if bookieIndex 0 read failed, we continue read from 1 and read successfully
  3. Invoke SequenceReadRequest#complete and recycle WriteSet
  4. 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.

ytong01 avatar Nov 11 '25 02:11 ytong01