Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make AddIndexBackupOperation allowed in passive state [HZ-4582] [HZ-4…
…572] (#1076) `AddIndexBackupOperation` should be allowed in passive state for the same reason why `AddIndexOperation` is. The issue became visible after improving assertions in https://github.com/hazelcast/hazelcast-mono/pull/1009, before it just failed (with warnings in logs) during proxy initialisation. This is a missing part of https://github.com/hazelcast/hazelcast-mono/pull/596. This PR fixes useless warnings `java.lang.IllegalStateException: Cluster is in PASSIVE state! Operation: com.hazelcast.map.impl.operation.AddIndexBackupOperation`. Map proxy initialization on primary does not fail - backup operation errors are ignored, so indexes should be fine. The only cases where it might matter are: 1. for nodes that do not own any partitions but that is very unlikely (see comment in `AddIndexBackupOperation.runInternal`). 2. if the members are restarted quickly one after another. Backup operation has 5s timeout and in case of backup operation error no response is returned. This may cause MapProxy not being initialized yet when another member joins, so it will not be sent in `PostJoinProxyOperation`. There is a discrepancy in handling `Backup` which contains not-`AllowedDuringPassiveState` operation in PASSIVE state between normal execution (allowed! - does not check nested operation) and offloaded execution (fails with `IllegalStateException` - steps engine checks preconditions for nested operation). That explains the difference between force-offload and normal behavior. This might be fixed separately as it is error prone, but generally our operations should be reasonably defined and not cause problems. Fixes HZ-4582, HZ-4572 Fixes https://github.com/hazelcast/hazelcast-enterprise/issues/7076 Fixes https://github.com/hazelcast/hazelcast-enterprise/issues/7075 GitOrigin-RevId: ef1eec30f3a78f07c0c1e38ae6fbffb482a6a9f4
- Loading branch information