private boolean updateLocationOfStatefulTrigger(String triggerName, int currentDataNodeId) {
    try (ConfigNodeClient configNodeClient =
        CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
      TDataNodeLocation newTDataNodeLocation =
          configNodeClient.getLocationOfStatefulTrigger(triggerName).getDataNodeLocation();
      if (newTDataNodeLocation != null
          && currentDataNodeId != newTDataNodeLocation.getDataNodeId()) {
        // indicates that the location of this stateful trigger has changed
        TriggerManagementService.getInstance()
            .updateLocationOfStatefulTrigger(triggerName, newTDataNodeLocation);
        return true;
      }
      return false;
    } catch (ClientManagerException | TException | IOException e) {
      LOGGER.error(
          "Failed to update location of stateful trigger({}) through config node. The cause is {}.",
          triggerName,
          e);
      return false;
    }
  }
Return true if the config node returns a new TDataNodeLocation.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java