rpuch commented on code in PR #4361:
URL: https://github.com/apache/ignite-3/pull/4361#discussion_r1756330423
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageLeaderElectionListener.java:
##########
@@ -179,6 +197,12 @@ private interface Action {
* Executes the given action if the current node is the Meta Storage
leader.
*/
private void execute(Action action) {
+ if (leaderSecondaryDutiesPaused.getAsBoolean()) {
Review Comment:
No pattern is applicable in all situations. If it's not the best solution in
some case, we should not stick to it just because it is a pattern and it works
well in many other situations. In this situation, it is beneficial to do the
check outside the lock (I explained why above), so I don't see why the pattern
is to be blindly obeyed.
--
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]