This is an automated email from the ASF dual-hosted git repository.
mpetrov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 9cecf195e50 IGNITE-22562 Fixed notification message when Ignite
Statistics usage state changes (#11494)
9cecf195e50 is described below
commit 9cecf195e505bfa62f8367312762413cf40f37c6
Author: Julia Bakulina <[email protected]>
AuthorDate: Wed Aug 28 10:36:27 2024 +0300
IGNITE-22562 Fixed notification message when Ignite Statistics usage state
changes (#11494)
---
.../processors/query/stat/IgniteStatisticsManagerImpl.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
index 1e2ceb3c593..c39151b83f8 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsManagerImpl.java
@@ -99,7 +99,7 @@ public class IgniteStatisticsManagerImpl implements
IgniteStatisticsManager {
private final DistributedEnumProperty<StatisticsUsageState> usageState =
new DistributedEnumProperty<>(
"statistics.usage.state",
"Statistics usage state. OFF - No statistics used, NO_UPDATE -
Statistics used 'as is' without updates, " +
- "ON - Statistics used and updated after each changes.",
+ "ON - Statistics used and updated after each changes (a default
value).",
StatisticsUsageState::fromOrdinal,
StatisticsUsageState::index,
StatisticsUsageState.class);
@@ -216,8 +216,10 @@ public class IgniteStatisticsManagerImpl implements
IgniteStatisticsManager {
ctx.internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher
-> {
usageState.addListener((name, oldVal, newVal) -> {
- if (log.isInfoEnabled())
- log.info(String.format("Statistics usage state was changed
from %s to %s", oldVal, newVal));
+ if (log.isInfoEnabled() && newVal != null) {
+ log.info(String.format("Statistics usage state was changed
from %s to %s",
+ oldVal == null ? DEFAULT_STATISTICS_USAGE_STATE :
oldVal, newVal));
+ }
lastUsageState = newVal;