public void invalidate(
      final String database,
      final String tableName,
      final String columnName,
      final boolean isAttributeColumn) {
    readWriteLock.writeLock().lock();
    try {
      // Table cache's invalidate must be guarded by this lock
      DataNodeTableCache.getInstance().invalid(database, tableName, columnName);
      final ToIntFunction<TableDeviceCacheEntry> updateFunction =
          isAttributeColumn
              ? entry -> -entry.invalidateAttributeColumn(columnName)
              : entry -> -entry.invalidateLastCache(columnName, true);
      dualKeyCache.update(new TableId(null, tableName), deviceID -> true, updateFunction);
    } finally {
      readWriteLock.writeLock().unlock();
    }
  }
Invalidate the last cache of one device.

@param database the device's database, without "root"
@param deviceId IDeviceID
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java