horizonzy commented on code in PR #3359:
URL: https://github.com/apache/bookkeeper/pull/3359#discussion_r939801881
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java:
##########
@@ -440,6 +440,31 @@ default boolean
areAckedBookiesAdheringToPlacementPolicy(Set<BookieId> ackedBook
return true;
}
+ /**
+ * Returns placement result. If the currentEnsemble is not adhering
placement policy, returns new ensemble that
+ * adheres placement policy. It should be implemented so as to minify the
number of bookies replaced.
+ *
+ * @param ensembleSize
+ * ensemble size
+ * @param writeQuorumSize
+ * writeQuorumSize of the ensemble
+ * @param ackQuorumSize
+ * ackQuorumSize of the ensemble
+ * @param excludeBookies
+ * bookies that should not be considered as targets
+ * @param currentEnsemble
+ * current ensemble
+ * @return a placement result
+ */
+ default PlacementResult<List<BookieId>> replaceToAdherePlacementPolicy(
Review Comment:
>
> And what about the default rack? [#2931
(review)](https://github.com/apache/bookkeeper/pull/2931#pullrequestreview-1062016018)
>
> If it is being addressed, please let me know where it is.
I means if we didn't handle the shutdown bookies, it will be handle as
default-bookie, the default-rack is different with other bookie's rack, so it
won't be replaced. Now we add the shutdown bookies to excludes nodes to replace
it.
--
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]