Skip to content

Bug onClusterChange() for bookie deletion #4735

@GentiliEmanuele

Description

@GentiliEmanuele

BUG REPORT

Describe the bug

When a topology change occurs and it's communicated to the policy by onClusterChange(), if slave is not null and the change correspond to the deletion of a bookie, the list returned from onClusterChange() is empty.

To Reproduce
Get my branch and execute the command:

mvn -Dtest=OnClusterChangeREPPTest test -pl bookkeeper-server

This command execute the test that follows this steps:

  1. Initialize the policy with stabilizePeriodSecond > 0.
  2. Call onClusterChange() a first time specifying at least one writableBookies.
  3. Call onClusterChange() a second time specifying a set of writableBookies where lacks at least one bookie specified in the previous step.

Expected behavior
The method should return the remove bookie (but return an empty list).

Screenshots
In this first screenshot note the deadBookies size (equals to 1):
Image

After the execution of onClusterChange() to the slave the size becomes 0 and the information about dead bookies is missed:
Image

Additional context
At this link is available possible fix for the method onClusterChange(). The original implementation can be seen at this link.
(Ticket was opened with the support of @gulyx)

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