sanpwc commented on code in PR #1631:
URL: https://github.com/apache/ignite-3/pull/1631#discussion_r1100328432
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -1166,29 +1304,38 @@ synchronized void stopTimers() {
* Returns a set of nodes that should be added to zone's data nodes.
*
* @param scaleUpRevision Last revision of the scale up event.
- * @param scaleDownRevision Last revision of the scale down event.
* @param revision Revision of the event for which this data nodes is
needed.
- * @return Set of nodes that should be added to zone's data nodes.
+ * @return List of nodes that should be added to zone's data nodes.
*/
- Set<String> nodesToAddToDataNodes(long scaleUpRevision, long
scaleDownRevision, long revision) {
+ List<String> nodesToAddToDataNodes(long scaleUpRevision, long
revision) {
Long toKey = topologyAugmentationMap.floorKey(revision);
+ Long fromKey = topologyAugmentationMap.ceilingKey(scaleUpRevision);
Review Comment:
First of all
`topologyAugmentationMap.subMap(scaleUpRevision, true, revision, true)` is
the same as
`topologyAugmentationMap.subMap(topologyAugmentationMap.ceilingKey(scaleUpRevision),
true, topologyAugmentationMap.floorKey(revision), true)`
so `nodesToAddToDataNodes(long scaleUpRevision, long revision)` is the same
as
`accumulateNodes(scaleUpRevision, revision, true)`
Besides that
subMap(scaleUpRevision, **false** should work and it's actually proper one
because you should exclude already accumulated values and left border already
included in previous timer.
--
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]