public long assignCompactionQueryId() {
    long threadNum = Long.parseLong((Thread.currentThread().getName().split("-"))[5]);
    long queryId = Long.MIN_VALUE + threadNum;
    filePathsManager.addQueryId(queryId);
    return queryId;
  }
Register a read id for compaction. The name of the compaction thread is
'pool-x-IoTDB-Compaction-xx', xx in which is usually an integer from 0 to
MAXCOMPACTION_THREAD_NUM. We use the following rules to define read id for compaction: <br>
queryId = xx + Long.MIN_VALUE
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/control/QueryResourceManager.java