[
https://issues.apache.org/jira/browse/ARTEMIS-4355?focusedWorklogId=870379&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-870379
]
ASF GitHub Bot logged work on ARTEMIS-4355:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 11/Jul/23 16:21
Start Date: 11/Jul/23 16:21
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #4545:
URL: https://github.com/apache/activemq-artemis/pull/4545#discussion_r1259969152
##########
artemis-quorum-ri/src/test/java/org/apache/activemq/artemis/quorum/zookeeper/CuratorDistributedLockTest.java:
##########
@@ -84,8 +82,6 @@ public void setupEnv() throws Throwable {
}
testingServer = new TestingCluster(clusterSpecs);
testingServer.start();
- // start waits for quorumPeer!=null but not that it has started...
- Wait.waitFor(this::ensembleHasLeader);
Review Comment:
Did this actually change on the Curator side, or did you just remove the
'wait for start' as the getQuorumPeer method went away?
##########
tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/quorum/ZookeeperPluggableQuorumPeerTest.java:
##########
@@ -48,15 +47,7 @@ public ZookeeperPluggableQuorumPeerTest() {
// both roles as both wish to be primary but will revert to backup
primary = new BrokerControl("primary-peer-a", JMX_PORT_PRIMARY,
"zkReplicationPrimaryPeerA", PRIMARY_PORT_OFFSET);
backup = new BrokerControl("primary-peer-b", JMX_PORT_BACKUP,
"zkReplicationPrimaryPeerB", BACKUP_PORT_OFFSET);
- brokers = new LinkedList(Arrays.asList(primary, backup));
- }
-
- @Test
- @Override
- public void testBackupFailoverAndPrimaryFailback() throws Exception {
- // peers don't request fail back by default
- // just wait for setup to avoid partial stop of zk via fast tear down
with async setup
- Wait.waitFor(this::ensembleHasLeader);
Review Comment:
Again, did something change on the Curator side, or is this now potentially
doing the very 'partial stop of zk via fast tear down with async setup' this
was specifically there to avoid?
##########
artemis-quorum-ri/src/test/java/org/apache/activemq/artemis/quorum/zookeeper/CuratorDistributedLockTest.java:
##########
@@ -337,21 +333,8 @@ public void
beNotifiedOfAlreadyUnavailableManagerAfterAddingListener() throws Ex
}
}
- private boolean ensembleHasLeader() {
- return
testingServer.getServers().stream().filter(CuratorDistributedLockTest::isLeader).count()
!= 0;
- }
-
- private static boolean isLeader(TestingZooKeeperServer server) {
- if (server.getInstanceSpecs().size() == 1) {
- return true;
- }
- long leaderId = server.getQuorumPeer().getLeaderId();
- long id = server.getQuorumPeer().getId();
- return id == leaderId;
- }
-
private void stopMajorityNotLeaderNodes(boolean fromLast) throws Exception {
- List<TestingZooKeeperServer> followers =
testingServer.getServers().stream().filter(Predicates.not(CuratorDistributedLockTest::isLeader)).collect(Collectors.toList());
+ List<TestingZooKeeperServer> followers = testingServer.getServers();
Review Comment:
Is this now just stopping 'a majority of nodes' rather than the original
'majority of non-leader nodes'?
Issue Time Tracking
-------------------
Worklog Id: (was: 870379)
Time Spent: 40m (was: 0.5h)
> Update Сurator to 5.5.0
> -----------------------
>
> Key: ARTEMIS-4355
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4355
> Project: ActiveMQ Artemis
> Issue Type: Dependency upgrade
> Components: clustering
> Affects Versions: 2.29.0
> Reporter: Alexey Markevich
> Priority: Minor
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)