Merge pull request #27167 from chbatey/regular-rebalance-log
Log rebalance progress at INFO per rebalance info
This commit is contained in:
commit
a3ae0787ba
2 changed files with 9 additions and 1 deletions
|
|
@ -99,6 +99,7 @@ akka.cluster.sharding {
|
||||||
# The difference between number of shards in the region with most shards and
|
# The difference between number of shards in the region with most shards and
|
||||||
# the region with least shards must be greater than (>) the `rebalanceThreshold`
|
# the region with least shards must be greater than (>) the `rebalanceThreshold`
|
||||||
# for the rebalance to occur.
|
# for the rebalance to occur.
|
||||||
|
# It is also the maximum number of shards that will start rebalancing per rebalance-interval
|
||||||
# 1 gives the best distribution and therefore typically the best choice.
|
# 1 gives the best distribution and therefore typically the best choice.
|
||||||
# Increasing the threshold can result in quicker rebalance but has the
|
# Increasing the threshold can result in quicker rebalance but has the
|
||||||
# drawback of increased difference between number of shards (and therefore load)
|
# drawback of increased difference between number of shards (and therefore load)
|
||||||
|
|
|
||||||
|
|
@ -866,7 +866,13 @@ abstract class ShardCoordinator(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def continueRebalance(shards: Set[ShardId]): Unit =
|
def continueRebalance(shards: Set[ShardId]): Unit = {
|
||||||
|
if (log.isInfoEnabled && (shards.nonEmpty || rebalanceInProgress.nonEmpty)) {
|
||||||
|
log.info(
|
||||||
|
"Starting rebalance for shards [{}]. Current shards rebalancing: [{}]",
|
||||||
|
shards.mkString(","),
|
||||||
|
rebalanceInProgress.keySet.mkString(","))
|
||||||
|
}
|
||||||
shards.foreach { shard =>
|
shards.foreach { shard =>
|
||||||
if (!rebalanceInProgress.contains(shard)) {
|
if (!rebalanceInProgress.contains(shard)) {
|
||||||
state.shards.get(shard) match {
|
state.shards.get(shard) match {
|
||||||
|
|
@ -885,6 +891,7 @@ abstract class ShardCoordinator(
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue