sk0x50 commented on a change in pull request #9285:
URL: https://github.com/apache/ignite/pull/9285#discussion_r683528405
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
##########
@@ -1315,4 +1316,22 @@ public void removeIOStatistic(boolean destroy) {
if (statHolderIdx != IoStatisticsHolderNoOp.INSTANCE)
ctx.kernalContext().metric().remove(statHolderIdx.metricRegistryName(),
destroy);
}
+
+ /** {@inheritDoc} */
+ @Override public boolean equals(Object o) {
Review comment:
These methods are not required because you use a custom comparator
anyway.
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
##########
@@ -305,9 +306,6 @@
/** Histogram of blocking PME durations. */
private volatile HistogramMetricImpl blockingDurationHistogram;
- /** Delay before rebalancing code is start executing after exchange
completion. For tests only. */
Review comment:
This change does not correlate with the description of the Jira ticket.
I think it should be done under a separate issue
https://issues.apache.org/jira/browse/IGNITE-12662
and this change must be properly described here:
https://ignite.apache.org/docs/latest/data-rebalancing#other-properties
(At least, we should mark this property as deprecated and noop).
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
##########
@@ -4028,61 +3960,32 @@ void trim() {
* Represents a cache rebalance order that takes into account both values:
rebalance order itself and rebalance mode.
* It is assumed SYNC caches should be rebalanced in the first place.
*/
- private static class CacheRebalanceOrder implements
Comparable<CacheRebalanceOrder> {
- /** Cache rebalance order. */
- private int order;
-
- /** Cache rebalance mode. */
- private CacheRebalanceMode mode;
-
- /**
- * Creates a new instance of CacheRebalanceOrder.
- *
- * @param order Cache rebalance order.
- * @param mode Cache rebalance mode.
- */
- public CacheRebalanceOrder(int order, CacheRebalanceMode mode) {
- this.order = order;
- this.mode = mode;
- }
+ private static class CacheRebalanceOrderComparator implements
Comparator<CacheGroupContext>, Serializable {
Review comment:
Yes, this is a common practice to implement `Serializable` interface by
a comparator.
In this particular case, `assignsSet` is always a "local map" and will never
be serialized/deserialized.
So, it is not required to implement `Serializable`
--
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]