alpass163gmail commented on code in PR #18265:
URL: https://github.com/apache/iotdb/pull/18265#discussion_r3627895428
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/lease/MetadataLeaseManager.java:
##########
@@ -222,20 +223,38 @@ private void pullMetaDataAndInit() {
LOGGER.error(DataNodeSchemaMessages.FAILED_TO_MARK_METADATA_STATE_AS_PULLING,
metadataState);
return;
}
-
- for (final MetadataAction action : pullMetaList) {
- try {
- action.execute();
- } catch (final Throwable t) {
- metadataStateRef.set(MetadataState.PULL_OR_INIT_FAILED,
metadataStateRef.getStamp() + 1);
- LOGGER.error(DataNodeSchemaMessages.FAILED_TO_PULL_OR_INIT_METADATA,
t);
- rethrowUnchecked(t);
- }
+ try {
+ reloadRelatedCache();
+ } catch (final Throwable t) {
+ metadataStateRef.set(MetadataState.PULL_OR_INIT_FAILED,
metadataStateRef.getStamp() + 1);
+ LOGGER.error(DataNodeSchemaMessages.FAILED_TO_PULL_OR_INIT_METADATA, t);
+ rethrowUnchecked(t);
}
+
this.lastConfigNodeHeartbeatNanos = nanoClock.getAsLong();
metadataStateRef.set(MetadataState.NORMAL, metadataStateRef.getStamp() +
1);
}
+ void reloadRelatedCache() {
+ try (ConfigNodeClient configNodeClient =
+
ConfigNodeClientManager.getInstance().borrowClient(ConfigNodeInfo.CONFIG_REGION_ID))
{
+
+ final TDataNodeLeaseRecoveryResp resp =
configNodeClient.reloadCacheAfterLeaseRecovery();
Review Comment:
for set/unset/alter procedure, make sure the DN would executed with internal
error before the DN reload the cache snapshot successfully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]