HikariCP icon indicating copy to clipboard operation
HikariCP copied to clipboard

Is connectionTimeout/validationTimeout refreshed by HouseKeeper thread safe ?

Open fightlxp opened this issue 2 years ago • 1 comments

abstract class PoolBase { ...... long connectionTimeout; long validationTimeout; ...... }

private final class HouseKeeper implements Runnable {

  @Override
  public void run()
  {
        ......
        // refresh values in case they changed via MBean
        connectionTimeout = config.getConnectionTimeout();
        validationTimeout = config.getValidationTimeout();
       ......
  }

}

When HouseKeeper refresh connectionTimeout/validationTimeout in PoolBase, Can other threads see the latest value ?

fightlxp avatar Dec 02 '21 14:12 fightlxp

yes
houseKeepingExecutorService's corePoolSize is 1

wangdengwu avatar Dec 10 '21 06:12 wangdengwu