@Override
  public HiveLockManager getLockManager() {
    init();
    if (lockMgr == null) {
      lockMgr = new DbLockManager(conf, this);
    }
    return lockMgr;
  }
we don't expect multiple threads to call this method concurrently but {@link #lockMgr} will
be read by a different threads than one writing it, thus it's {@code volatile}
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java