[Bug] Spark engine fails to open sessions with SERVER_LOCAL share level
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Read externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala, especially getOrNewSparkSession around line 112, where the issue reports that SERVER_LOCAL is missing from the share-level match. Trace the server-side engine discovery and session routing before changing the branches. Add regression coverage for OpenSession, SQL, and CloseSession across the listed isolation and share-level cases; done means session state and connection behavior match those expectations.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Code of Conduct
- I agree to follow this project's Code of Conduct
Search before asking
- I have searched in the issues and found no similar issues.
Describe the bug
With kyuubi.engine.share.level=SERVER_LOCAL, the Spark SQL engine fails to open a session with a scala.MatchError, before executing SQL.
We reproduced this through both Binary TLS JDBC and HTTP TLS JDBC with valid ASCII credentials, Spark 3.5.9, Java 17, and spark.master=local[2]. Changing only the share level to SERVER allowed the same connection checks and SQL queries to pass.
Steps to reproduce:
- Start a Kyuubi server with a Spark SQL engine and the configuration below.
- Open a regular JDBC connection with valid credentials and wait for engine OpenSession.
- Observe the exception below. A query such as
SELECT 1cannot run because session creation fails. - Set
kyuubi.engine.share.level=SERVERand restart with a fresh engine as a comparison.
Affects Version(s)
master at f3125812e364ad1ad687d2e57b693de114a4991d, using 1.13.0-SNAPSHOT artifacts. The first affected release has not been established.
Kyuubi Server Log Output
The client reports the engine OpenSession exception shown below.
Kyuubi Engine Log Output
Caused by: java.lang.RuntimeException: scala.MatchError:
SERVER_LOCAL (of class scala.Enumeration$Val)
at SparkSQLSessionManager.getOrNewSparkSession(SparkSQLSessionManager.scala:112)
Kyuubi Server Configurations
kyuubi.engine.type=SPARK_SQL
kyuubi.engine.share.level=SERVER_LOCAL
kyuubi.engine.doAs.enabled=false
kyuubi.engine.single.spark.session=false
kyuubi.engine.user.isolated.spark.session=true
Kyuubi Engine Configurations
spark.master=local[2]
Additional context
Contributions are welcome.
In SparkSQLSessionManager.getOrNewSparkSession, the share-level match handles CONNECTION, USER, GROUP, and SERVER, but omits SERVER_LOCAL.
Consider handling SERVER_LOCAL alongside SERVER in both the guarded per-connection branch and the per-user cache branch. Preserve the server-side engine discovery/routing boundary: SERVER_LOCAL shares an engine within the server that launched it.
Suggested regression coverage:
Please verify through OpenSession, SQL, and CloseSession:
- With single-session mode disabled and user isolation enabled, two connections for the same user have independent temporary views and SQLConf.
- With user isolation disabled, the same user reuses session state, different users remain isolated, and reference counting and idle eviction preserve active sessions.
- Closing one connection leaves other connections usable.
- Explicit single-session mode and existing share levels retain their behavior.
Are you willing to submit PR?
- Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- No. I cannot submit a PR at this time.
- Lingua principale
- Scala
- Stelle
- 2.4k
- Fork
- 1k
- Merge medio
- 18h 17m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/kyuubi
-
kind:bug priority:major
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] HiveDialect shares its colspecs dict with SQLAlchemy's DefaultDialect (python/pyhive)Forse già presa @rusackas l’ha presa 24 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
apache/kyuubi#7786 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
isClassLoadable answers false on threads without a context classloaderForse già presa @LuciferYang l’ha presa 59 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
kind:feature priority:major
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/kyuubi#7454 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug][TEST] JSON event logging suites fail when CI crosses midnightForse già presa @aajisaka l’ha presa 1 giorno fa. Apertakind:bug priority:major
apache/kyuubi#7853 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/kyuubi
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
apache/datafusion-comet#7559 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
propensive/soundness#2438 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ergoplatform/ergo#2918 ·
I maintainer di solito rispondono entro 2 giorni
-
Coach photos should fit to coach widgetForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
lichess-org/lila#22440 ·
I maintainer di solito rispondono entro 1 giorno