You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/05/19 08:46:23 UTC

[GitHub] [incubator-kyuubi] ulysses-you opened a new pull request, #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

ulysses-you opened a new pull request, #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705

   backport https://github.com/apache/incubator-kyuubi/pull/2687 for branch-1.5
   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   closes #2686
   
   ### _How was this patch tested?_
   - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
pan3793 commented on code in PR #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705#discussion_r876803194


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -147,15 +151,42 @@ private[kyuubi] class EngineRef(
     case CONNECTION => f
     case _ =>
       val lockPath =
-        ZKPaths.makePath(s"${serverSpace}_$shareLevel", "lock", appUser, subdomain)
+        ZKPaths.makePath(s"${serverSpace}_${shareLevel}_$engineType", "lock", appUser, subdomain)

Review Comment:
   For back port fix, I think we'd better don't change the lock path.



##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -147,15 +151,42 @@ private[kyuubi] class EngineRef(
     case CONNECTION => f
     case _ =>
       val lockPath =
-        ZKPaths.makePath(s"${serverSpace}_$shareLevel", "lock", appUser, subdomain)
+        ZKPaths.makePath(s"${serverSpace}_${shareLevel}_$engineType", "lock", appUser, subdomain)

Review Comment:
   For back port fix, I think we'd better not change the lock path.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
pan3793 commented on code in PR #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705#discussion_r876820272


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -147,15 +151,42 @@ private[kyuubi] class EngineRef(
     case CONNECTION => f
     case _ =>
       val lockPath =
-        ZKPaths.makePath(s"${serverSpace}_$shareLevel", "lock", appUser, subdomain)
+        ZKPaths.makePath(s"${serverSpace}_${shareLevel}_$engineType", "lock", appUser, subdomain)

Review Comment:
   It may break the lock mechanism during a rolling upgrade



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705#discussion_r876815494


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -147,15 +151,42 @@ private[kyuubi] class EngineRef(
     case CONNECTION => f
     case _ =>
       val lockPath =
-        ZKPaths.makePath(s"${serverSpace}_$shareLevel", "lock", appUser, subdomain)
+        ZKPaths.makePath(s"${serverSpace}_${shareLevel}_$engineType", "lock", appUser, subdomain)

Review Comment:
   removed



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on a diff in pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on code in PR #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705#discussion_r876841063


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -147,15 +151,42 @@ private[kyuubi] class EngineRef(
     case CONNECTION => f
     case _ =>
       val lockPath =
-        ZKPaths.makePath(s"${serverSpace}_$shareLevel", "lock", appUser, subdomain)
+        ZKPaths.makePath(s"${serverSpace}_${shareLevel}_$engineType", "lock", appUser, subdomain)

Review Comment:
   so let's not backport it then as a breaking change over a bugfix



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you closed pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout
URL: https://github.com/apache/incubator-kyuubi/pull/2705


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on PR #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705#issuecomment-1131743993

   thanks, merging to branch-1.5


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on a diff in pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on code in PR #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705#discussion_r876816772


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -147,15 +151,42 @@ private[kyuubi] class EngineRef(
     case CONNECTION => f
     case _ =>
       val lockPath =
-        ZKPaths.makePath(s"${serverSpace}_$shareLevel", "lock", appUser, subdomain)
+        ZKPaths.makePath(s"${serverSpace}_${shareLevel}_$engineType", "lock", appUser, subdomain)

Review Comment:
   I think it's fine and necessary to keep the _$engineType here



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2705: [KYUUBI #2686][1.5] Fix lock bug if engine initialization timeout

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #2705:
URL: https://github.com/apache/incubator-kyuubi/pull/2705#discussion_r877081093


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/EngineRef.scala:
##########
@@ -75,6 +75,10 @@ private[kyuubi] class EngineRef(
 
   private val clientPoolName: String = conf.get(ENGINE_POOL_NAME)
 
+  // In case the multi kyuubi instances have the small gap of timeout, here we add
+  // a small amount of time for timeout
+  private val LOCK_TIMEOUT_SPAN_FACTOR = if (Utils.isTesting) 0.5 else 0.1

Review Comment:
   it may be a flaky test in master branch too. let me do a followup ..



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org