This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch branch-1.10
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.10 by this push:
new 860173db95 [KYUUBI #7241] Transfer engine pool name to lower case
860173db95 is described below
commit 860173db950b1fe629b15958bc7d2f94228fe144
Author: Wang, Fei <[email protected]>
AuthorDate: Sat Nov 8 11:27:39 2025 -0800
[KYUUBI #7241] Transfer engine pool name to lower case
### Why are the changes needed?
1. engine pool name is used to build the subdomain.
2. the subdomain is case-insensitive
3. however, now, the engine pool name is case sensitive
4. when we try to delete the engine with subdomain(enginePool-index), it
failed to find the zookeeper path
https://github.com/apache/kyuubi/blob/bebe10adf369a61b17f1f530126f8808062d2f7e/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala#L2363-L2369
FYI:
Unable to delete the engine zk node with engine pool mode.
<img width="1726" height="120" alt="image"
src="https://github.com/user-attachments/assets/363574ed-9c79-435e-a46d-a564b296784b"
/>
### How was this patch tested?
UT.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #7241 from turboFei/engine_pool.
Closes #7241
7cbe255c8 [Wang, Fei] UT
c245a4051 [Wang, Fei] Transfer engine pool name to lower case
Authored-by: Wang, Fei <[email protected]>
Signed-off-by: Wang, Fei <[email protected]>
(cherry picked from commit e7f06a3fcb9db52e136a2928092697401ebaa695)
Signed-off-by: Wang, Fei <[email protected]>
---
.../src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala | 1 +
.../src/test/scala/org/apache/kyuubi/engine/EngineRefTests.scala | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git
a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
index b7b1316d51..403c84d5a4 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
@@ -2412,6 +2412,7 @@ object KyuubiConf {
.doc("The name of the engine pool.")
.version("1.5.0")
.stringConf
+ .transformToLowerCase
.checkValue(validZookeeperSubPath.matcher(_).matches(), "must be valid
zookeeper sub path.")
.createWithDefault("engine-pool")
diff --git
a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefTests.scala
b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefTests.scala
index b2b266322d..aeae08dd63 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefTests.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefTests.scala
@@ -210,12 +210,13 @@ trait EngineRefTests extends KyuubiFunSuite {
// unset subdomain and set engine pool name and 1 <= engine pool size <
threshold
conf.unset(ENGINE_SHARE_LEVEL_SUBDOMAIN)
- val enginePoolName = "test-pool"
+ val enginePoolName = "Test-pool"
+ val lowerEnginePoolName = "test-pool"
conf.set(ENGINE_POOL_NAME, enginePoolName)
conf.set(ENGINE_POOL_SIZE, 3)
val engine6 = new EngineRef(conf, user, true,
PluginLoader.loadGroupProvider(conf), id, null)
- assert(engine6.subdomain.startsWith(s"$enginePoolName-"))
-
+ assert(!engine6.subdomain.startsWith(s"$enginePoolName-"))
+ assert(engine6.subdomain.startsWith(s"$lowerEnginePoolName-"))
conf.unset(ENGINE_SHARE_LEVEL_SUBDOMAIN)
conf.set(ENGINE_POOL_SIZE, 5)
val pool_name = "pool_default_name"