mirror of https://github.com/apache/druid.git
DruidCoordinator: Leave the ServerInventoryView running when we lose leadership. (#3830)
This commit is contained in:
parent
229559b46a
commit
ce0049d8ff
|
@ -553,7 +553,6 @@ public class DruidCoordinator
|
|||
leader = true;
|
||||
metadataSegmentManager.start();
|
||||
metadataRuleManager.start();
|
||||
serverInventoryView.start();
|
||||
serviceAnnouncer.announce(self);
|
||||
final int startingLeaderCounter = leaderCounter;
|
||||
|
||||
|
@ -635,7 +634,6 @@ public class DruidCoordinator
|
|||
loadManagementPeons.clear();
|
||||
|
||||
serviceAnnouncer.unannounce(self);
|
||||
serverInventoryView.stop();
|
||||
metadataRuleManager.stop();
|
||||
metadataSegmentManager.stop();
|
||||
leader = false;
|
||||
|
|
|
@ -304,13 +304,7 @@ public class DruidCoordinatorTest extends CuratorTestBase
|
|||
EasyMock.expect(serverInventoryView.getInventory()).andReturn(
|
||||
ImmutableList.of(druidServer)
|
||||
).atLeastOnce();
|
||||
serverInventoryView.start();
|
||||
EasyMock.expectLastCall().atLeastOnce();
|
||||
EasyMock.expect(serverInventoryView.isStarted()).andReturn(true).anyTimes();
|
||||
|
||||
serverInventoryView.stop();
|
||||
EasyMock.expectLastCall().once();
|
||||
|
||||
EasyMock.replay(serverInventoryView);
|
||||
|
||||
coordinator.start();
|
||||
|
|
Loading…
Reference in New Issue