You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InvalidConfigurationException is thrown at 'runtime' when a merge-policy(which requires per-entry statistics enabled) is configured on a Map (IMDG v4.2)
#18804
Closed
erkangurgen opened this issue
May 30, 2021
· 1 comment
With IMDG v4.2, per-entry statistics of maps are disabled by default.
However, some merge-policies require per-entry statistics to be enabled. One example is "LatestUpdateMergePolicy" .
If the per-entry statistics is NOT enabled explicitly (true) on Map configuration, an InvalidConfigurationException is thrown at Runtime.
The problem is, the users who are not aware of this requirement face with the problem at runtime. We should prevent this invalid configuration problem before it comes up at runtime.
(
From the discussion with Engineering, possible solutions might be,
fail-fast if the configuration is inconsistent,
force-enable statistics if the WAN merge policy depends on it
)
This problem is valid for both configurations, Map(merge-policy) and Map(wan-replication-ref_merge-policy-class-name)
Exception stack trace for <map><merge-policy>LatestUpdateMergePolicy</merge-policy></map> :
SEVERE: [192.168.0.127]:5701 [7505source] [4.2] The merge policy LatestUpdateMergePolicy requires the merge type com.hazelcast.spi.merge.MergingLastUpdateTime, which is just provided if perEntryStatsEnabled field of map-config is true.
com.hazelcast.config.InvalidConfigurationException: The merge policy LatestUpdateMergePolicy requires the merge type com.hazelcast.spi.merge.MergingLastUpdateTime, which is just provided if perEntryStatsEnabled field of map-config is true.
at com.hazelcast.internal.config.MergePolicyValidator.checkMapMergePolicyWhenStatisticsAreDisabled(MergePolicyValidator.java:82)
at com.hazelcast.internal.config.MergePolicyValidator.checkMapMergePolicy(MergePolicyValidator.java:62)
at com.hazelcast.internal.config.ConfigValidator.checkMapConfig(ConfigValidator.java:143)
at com.hazelcast.map.impl.MapRemoteService.createDistributedObject(MapRemoteService.java:54)
at com.hazelcast.map.impl.MapService.createDistributedObject(MapService.java:188)
at com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.doCreateProxy(ProxyRegistry.java:245)
at com.hazelcast.spi.impl.proxyservice.impl.ProxyRegistry.createProxy(ProxyRegistry.java:219)
at com.hazelcast.spi.impl.proxyservice.impl.ProxyServiceImpl.initializeDistributedObject(ProxyServiceImpl.java:139)
at com.hazelcast.spi.impl.proxyservice.impl.operations.InitializeDistributedObjectOperation.run(InitializeDistributedObjectOperation.java:44)
at com.hazelcast.spi.impl.operationservice.Operation.call(Operation.java:189)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:272)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:248)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:213)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.run(OperationExecutorImpl.java:411)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.runOrExecute(OperationExecutorImpl.java:438)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvokeLocal(Invocation.java:600)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvoke(Invocation.java:579)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke0(Invocation.java:540)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:240)
at com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:59)
at com.hazelcast.client.impl.protocol.task.AbstractInvocationMessageTask.processInternal(AbstractInvocationMessageTask.java:38)
at com.hazelcast.client.impl.protocol.task.AbstractAsyncMessageTask.processMessage(AbstractAsyncMessageTask.java:71)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:153)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:116)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
Exception stack trace for <map><wan-replication-ref><merge-policy-class-name>LatestUpdateMergePolicy</merge-policy-class-name></wan-replication-ref></map>
SEVERE: [192.168.0.127]:5701 [7505source] [4.2] The merge policy LatestUpdateMergePolicy requires the merge type com.hazelcast.spi.merge.MergingLastUpdateTime, which is just provided if perEntryStatsEnabled field of map-config is true.
com.hazelcast.config.InvalidConfigurationException: The merge policy LatestUpdateMergePolicy requires the merge type com.hazelcast.spi.merge.MergingLastUpdateTime, which is just provided if perEntryStatsEnabled field of map-config is true.
at com.hazelcast.internal.config.MergePolicyValidator.checkMapMergePolicyWhenStatisticsAreDisabled(MergePolicyValidator.java:82)
at com.hazelcast.internal.config.MergePolicyValidator.checkMapMergePolicy(MergePolicyValidator.java:62)
at com.hazelcast.map.impl.MapContainer.initWanReplication(MapContainer.java:279)
at com.hazelcast.map.impl.MapContainer.<init>(MapContainer.java:145)
at com.hazelcast.map.impl.EnterpriseMapContainer.<init>(EnterpriseMapContainer.java:33)
at com.hazelcast.map.impl.EnterpriseMapServiceContextImpl.createMapContainer(EnterpriseMapServiceContextImpl.java:114)
at com.hazelcast.map.impl.MapServiceContextImpl.lambda$createMapConstructor$0(MapServiceContextImpl.java:195)
at com.hazelcast.internal.util.ConcurrencyUtil.getOrPutSynchronized(ConcurrencyUtil.java:140)
at com.hazelcast.map.impl.MapServiceContextImpl.getMapContainer(MapServiceContextImpl.java:286)
at com.hazelcast.map.impl.PartitionContainer.createRecordStore(PartitionContainer.java:90)
at com.hazelcast.map.impl.PartitionContainer.lambda$new$0(PartitionContainer.java:56)
at com.hazelcast.internal.util.ConcurrencyUtil.getOrPutSynchronized(ConcurrencyUtil.java:140)
at com.hazelcast.map.impl.PartitionContainer.getRecordStore(PartitionContainer.java:158)
at com.hazelcast.map.impl.operation.MapOperation.getRecordStoreOrNull(MapOperation.java:172)
at com.hazelcast.map.impl.operation.MapOperation.beforeRun(MapOperation.java:89)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:247)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:213)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.run(OperationExecutorImpl.java:411)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.runOrExecute(OperationExecutorImpl.java:438)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvokeLocal(Invocation.java:600)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvoke(Invocation.java:579)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke0(Invocation.java:540)
at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:240)
at com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:59)
at com.hazelcast.client.impl.protocol.task.AbstractPartitionMessageTask.processInternal(AbstractPartitionMessageTask.java:51)
at com.hazelcast.client.impl.protocol.task.AbstractAsyncMessageTask.processMessage(AbstractAsyncMessageTask.java:71)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.initializeAndProcessMessage(AbstractMessageTask.java:153)
at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.run(AbstractMessageTask.java:116)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:192)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:207)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:141)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.executeRun(OperationThread.java:123)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
The text was updated successfully, but these errors were encountered:
With IMDG v4.2, per-entry statistics of maps are disabled by default.
However, some merge-policies require per-entry statistics to be enabled. One example is "LatestUpdateMergePolicy" .
If the per-entry statistics is NOT enabled explicitly (true) on Map configuration, an InvalidConfigurationException is thrown at Runtime.
The problem is, the users who are not aware of this requirement face with the problem at runtime. We should prevent this invalid configuration problem before it comes up at runtime.
(
From the discussion with Engineering, possible solutions might be,
)
This problem is valid for both configurations, Map(merge-policy) and Map(wan-replication-ref_merge-policy-class-name)
Exception stack trace for
<map><merge-policy>LatestUpdateMergePolicy</merge-policy></map>
:Exception stack trace for
<map><wan-replication-ref><merge-policy-class-name>LatestUpdateMergePolicy</merge-policy-class-name></wan-replication-ref></map>
The text was updated successfully, but these errors were encountered: