GentiliEmanuele opened a new issue, #4735: URL: https://github.com/apache/bookkeeper/issues/4735
**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](https://github.com/GentiliEmanuele/bookkeeper/tree/OnClusterChange_Failure) and execute the command: ``` mvn -Dtest=OnClusterChangeREPPTest test -pl bookkeeper-server ``` This command execute the [test](https://github.com/GentiliEmanuele/bookkeeper/blob/3553efd41d3b2da02040a3e66c95dbad9d3fab23/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/OnClusterChangeREPPTest.java#L65) 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): <img width="1197" height="207" alt="Image" src="https://github.com/user-attachments/assets/2605bb73-c1be-42d4-9ca5-fbdbe0b3ed2e" /> After the execution of `onClusterChange()` to the slave the size becomes 0 and the information about dead bookies is missed: <img width="1072" height="210" alt="Image" src="https://github.com/user-attachments/assets/3e21600f-c8bc-438a-9c09-b6bd6edafdae" /> ***Additional context*** At this [link](https://github.com/GentiliEmanuele/bookkeeper/blob/a0deeefeb96f3981f0dfc72b7cefdd0068f107d7/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicy.java#L113) is available possible fix for the method `onClusterChange()`. The original implementation can be seen at this [link](https://github.com/GentiliEmanuele/bookkeeper/blob/3553efd41d3b2da02040a3e66c95dbad9d3fab23/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicy.java#L109). (Ticket was opened with the support of @gulyx) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
