This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch bugfixing_race_condition_segment_creation
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to 
refs/heads/bugfixing_race_condition_segment_creation by this push:
     new 617f76b  Fixing the race condition that segment finished before 
ControllerLeaderLocator created.
617f76b is described below

commit 617f76bb326e8f8f4c0c67e835996c378008100c
Author: Xiang Fu <fx19880...@gmail.com>
AuthorDate: Fri Aug 14 02:14:14 2020 -0700

    Fixing the race condition that segment finished before 
ControllerLeaderLocator created.
---
 .../java/org/apache/pinot/server/starter/helix/HelixServerStarter.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
 
b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
index 09b18ce..abe2275 100644
--- 
a/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
+++ 
b/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixServerStarter.java
@@ -363,6 +363,7 @@ public class HelixServerStarter implements ServiceStartable 
{
 
     LOGGER.info("Initializing server instance and registering state model 
factory");
     Utils.logVersions();
+    ControllerLeaderLocator.create(_helixManager);
     ServerSegmentCompletionProtocolHandler
         
.init(_serverConf.subset(SegmentCompletionProtocol.PREFIX_OF_CONFIG_OF_SEGMENT_UPLOADER));
     ServerConf serverInstanceConfig = 
DefaultHelixStarterServerConfig.getDefaultHelixServerConfig(_serverConf);
@@ -414,8 +415,6 @@ public class HelixServerStarter implements ServiceStartable 
{
     // Register the service status handler
     registerServiceStatusHandler();
 
-    ControllerLeaderLocator.create(_helixManager);
-
     if (_serverConf
         .getProperty(CONFIG_OF_STARTUP_ENABLE_SERVICE_STATUS_CHECK, 
DEFAULT_STARTUP_ENABLE_SERVICE_STATUS_CHECK)) {
       long endTimeMs = startTimeMs + 
_serverConf.getProperty(CONFIG_OF_STARTUP_TIMEOUT_MS, 
DEFAULT_STARTUP_TIMEOUT_MS);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to