@Override
  public long delete(ModEntry modEntry) {
    List<Pair<IDeviceID, IWritableMemChunkGroup>> targetDeviceList = new ArrayList<>();
    for (Entry<IDeviceID, IWritableMemChunkGroup> entry : memTableMap.entrySet()) {
      if (modEntry.affects(entry.getKey())) {
        targetDeviceList.add(new Pair<>(entry.getKey(), entry.getValue()));
      }
    }

    long pointDeleted = 0;
    for (Pair<IDeviceID, IWritableMemChunkGroup> pair : targetDeviceList) {
      if (modEntry.affectsAll(pair.left)) {
        pointDeleted += pair.right.deleteTime(modEntry);
      } else {
        pointDeleted += pair.right.delete(modEntry);
      }
      if (pair.right.isEmpty()) {
        memTableMap.remove(pair.left).release();
      }
    }
    return pointDeleted;
  }
Create this MemChunk if it's not exist.

@param deviceId device id
@param schemaList measurement schemaList
@return this MemChunkGroup
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractMemTable.java