private static int convertChunkIdToStoredId(long logChunkId) {
    //inlined Math.toIntExact(), just with more detailed error message
    int storeId = (int)(logChunkId);
    if (storeId != logChunkId) {
      throw new IllegalStateException("logChunkId(=" + logChunkId + ") doesn't fit into int32");
    }
    return storeId;
  }
private static int convertChunkIdToStoredId(long logChunkId)