Skip to content

Invoke WriteSet#get() after recycled #4680

@ytong01

Description

@ytong01

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions