Skip to content

Commit

Permalink
Fix the bug jvm not exit when enableAuth (#2653) (#2664)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Mar 24, 2023
1 parent 70aa480 commit b317437
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.pingcap.tispark.auth

import com.google.common.util.concurrent.ThreadFactoryBuilder

import com.pingcap.tikv.TiConfiguration
import com.pingcap.tikv.jdbc.JDBCClient
import com.pingcap.tispark.auth.TiAuthorization.{
Expand All @@ -41,7 +43,7 @@ case class TiAuthorization private (parameters: Map[String, String], tiConf: TiC
private var jdbcClient: JDBCClient = _

private val scheduler: ScheduledExecutorService =
Executors.newScheduledThreadPool(1)
Executors.newScheduledThreadPool(1, new ThreadFactoryBuilder().setDaemon(true).build())

val globalPrivs: AtomicReference[List[MySQLPriv.Value]] =
new AtomicReference(List.empty)
Expand Down

0 comments on commit b317437

Please sign in to comment.