public synchronized E remove(ID id) {
    queryHolder.setId(id);
    E output = remove(queryHolder);
    if (output == null) {
      return null;
    }
    size--;
    Preconditions.checkState(size >= 0, "The size of readyQueue cannot be negative.");
    return output;
  }
Remove and return the element by id. It returns null if it doesn't exist.

@param id the id of the element to be removed.
@return the removed element.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/IndexedBlockingQueue.java