You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2020/01/13 22:44:04 UTC
[incubator-pinot] branch fix_server_starter created (now 32d476b)
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a change to branch fix_server_starter
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.
at 32d476b Fix the exception in server instance when Helix starts a new ZK session
This branch includes the following new commits:
new 32d476b Fix the exception in server instance when Helix starts a new ZK session
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[incubator-pinot] 01/01: Fix the exception in server instance when
Helix starts a new ZK session
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch fix_server_starter
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit 32d476b6a6ea196c92b0e0a36e1f7f3d532e2df5
Author: Jackie (Xiaotian) Jiang <xa...@linkedin.com>
AuthorDate: Mon Jan 13 14:42:25 2020 -0800
Fix the exception in server instance when Helix starts a new ZK session
ServerInstance.start() is called when Helix starts a new ZK session, and
can be called multiple times. We only need to start the server instance
once, and simply ignore the following invocations.
---
.../java/org/apache/pinot/server/starter/ServerInstance.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/pinot-server/src/main/java/org/apache/pinot/server/starter/ServerInstance.java b/pinot-server/src/main/java/org/apache/pinot/server/starter/ServerInstance.java
index 2727d13..3d08051 100644
--- a/pinot-server/src/main/java/org/apache/pinot/server/starter/ServerInstance.java
+++ b/pinot-server/src/main/java/org/apache/pinot/server/starter/ServerInstance.java
@@ -100,8 +100,14 @@ public class ServerInstance {
LOGGER.info("Finish initializing server instance");
}
- public void start() {
- Preconditions.checkState(!_started, "Server instance is already started");
+ public synchronized void start() {
+ // This method is called when Helix starts a new ZK session, and can be called multiple times. We only need to start
+ // the server instance once, and simply ignore the following invocations.
+ if (_started) {
+ LOGGER.info("Server instance is already running, skipping the start");
+ return;
+ }
+
LOGGER.info("Starting server instance");
LOGGER.info("Starting instance data manager");
@@ -117,7 +123,7 @@ public class ServerInstance {
LOGGER.info("Finish starting server instance");
}
- public void shutDown() {
+ public synchronized void shutDown() {
Preconditions.checkState(_started, "Server instance is not running");
LOGGER.info("Shutting down server instance");
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org