[SPARK-26992][STS] Fix STS scheduler pool correct delivery#23895
[SPARK-26992][STS] Fix STS scheduler pool correct delivery#23895cxzl25 wants to merge 2 commits intoapache:masterfrom
Conversation
|
The user sets the value of spark.sql.thriftserver.scheduler.pool. For example Fix |
|
@srowen |
|
|
||
| private def withSchedulerPool[T](body: => T): T = { | ||
| val pool = sessionToActivePool.get(parentSession.getSessionHandle) | ||
| if (pool != null) { |
There was a problem hiding this comment.
Although this looks like it undoes the previous fix, you're saying it will always be null when this method starts right? It seems easier to unconditionally set it, unless there's some overhead I'm missing
There was a problem hiding this comment.
Because only the user submitted sql has set spark.sql.thriftserver.scheduler.pool=xxx, sessionToActivePool will put xxx value, will not be the default scheduler, so the default scheduler pool name is null
Unconditional setting it is worried about ambiguity, because only after the put value, there will be a need to take this value, although there is no overhead
|
Test build #4678 has finished for PR 23895 at commit
|
|
It seems reasonable; @caneGuy do you have thoughts on this? would it still address your issue? |
|
Merged to master |




What changes were proposed in this pull request?
The user sets the value of spark.sql.thriftserver.scheduler.pool.
Spark thrift server saves this value in the LocalProperty of threadlocal type, but does not clean up after running, causing other sessions to run in the previously set pool name.
How was this patch tested?
manual tests