ruanwenjun opened a new issue, #7282:
URL: https://github.com/apache/kyuubi/issues/7282

   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [x] I have searched in the 
[issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Describe the bug
   
   I noticed that we expose some engine attributes to ZooKeeper. In #4459, we 
added the Spark UI URL to the attributes.
   
   The issue is that these attributes are directly concatenated into the 
ZooKeeper path. If an attribute contains a '/', it may break the path structure 
and cause engine information parsing to fail.
   
   Put attribute at zk path.
   
https://github.com/apache/kyuubi/blob/3667026eece44b44334ce5f50d18b1ce95e2b19a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala#L359-L365
   
   Parse `KYUUBI_ENGINE_ID` from zk path might get empty content.
   
   
https://github.com/apache/kyuubi/blob/3667026eece44b44334ce5f50d18b1ce95e2b19a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala#L195-L222
   
   As a temporary fix, we can encode user-provided attributes before using them 
in the ZooKeeper path.
   
   As a long-term solution, we should avoid placing user-defined content in the 
ZK path altogether, and instead store it in the znode data using a JSON format.
   
   ### Affects Version(s)
   
   1.9.x
   
   ### Kyuubi Server Log Output
   
   ```logtalk
   
   ```
   
   ### Kyuubi Engine Log Output
   
   ```logtalk
   
   ```
   
   ### Kyuubi Server Configurations
   
   ```yaml
   
   ```
   
   ### Kyuubi Engine Configurations
   
   ```yaml
   
   ```
   
   ### Additional context
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes. I would be willing to submit a PR with guidance from the Kyuubi 
community to fix.
   - [x] No. I cannot submit a PR at this time.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to