public void deleteRegionAndMayDeleteWALNode(String databaseName, String dataRegionId) {
    if (config.getWalMode() == WALMode.DISABLE || !(walNodesManager instanceof ElasticStrategy)) {
      return;
    }

    String dataRegionName = databaseName + FILE_NAME_SEPARATOR + dataRegionId;
    ((ElasticStrategy) walNodesManager)
        .deleteUniqueIdAndMayDeleteWALNode(getApplicantUniqueId(dataRegionName, true));
    ((ElasticStrategy) walNodesManager)
        .deleteUniqueIdAndMayDeleteWALNode(getApplicantUniqueId(dataRegionName, false));
  }
Region information and WAL node will be removed when using ElasticStrategy.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java