@SuppressWarnings("BooleanMethodIsAlwaysInverted")
  public boolean deleteDataInMemory(ModEntry deletion) {
    flushQueryLock.writeLock().lock();
    logFlushQueryWriteLocked();
    try {
      boolean deleted = false;
      if (workMemTable != null) {
        long pointDeleted = workMemTable.delete(deletion);
        logger.info(
            "[Deletion] Deletion with {} in workMemTable, {} points deleted",
            deletion,
            pointDeleted);
        deleted = true;
      }
      // Flushing memTables are immutable, only record this deletion in these memTables for read
      if (!flushingMemTables.isEmpty()) {
        logger.info("[Deletion] Deletion with {} in flushingMemTable", deletion);
        modsToMemtable.add(new Pair<>(deletion, flushingMemTables.getLast()));
        deleted = true;
      }
      return deleted;
    } finally {
      flushQueryLock.writeLock().unlock();
      logFlushQueryWriteUnlocked();
    }
  }
Delete data which belongs to the timeseries `deviceId.measurementId` and the timestamp of which
<= 'timestamp' in the deletion. <br>

<p>Delete data in both working MemTable and flushing MemTables.

@return true if data in MemTable is successfully deleted, false otherwise
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java