From 8877bd3460dd5cadc11c6ae85f07b1ef526af315 Mon Sep 17 00:00:00 2001 From: KomachiSion <263976490@qq.com> Date: Tue, 8 Dec 2020 18:00:46 +0800 Subject: [PATCH] Fix the error in determining the type of deleted metadata --- .../nacos/naming/core/v2/cleaner/ExpiredMetadataCleaner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/v2/cleaner/ExpiredMetadataCleaner.java b/naming/src/main/java/com/alibaba/nacos/naming/core/v2/cleaner/ExpiredMetadataCleaner.java index 955c0f12a..ef66547e6 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/v2/cleaner/ExpiredMetadataCleaner.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/v2/cleaner/ExpiredMetadataCleaner.java @@ -67,11 +67,11 @@ public class ExpiredMetadataCleaner extends AbstractNamingCleaner { Loggers.SRV_LOG.info("Remove expired metadata {}", expiredInfo); if (null == expiredInfo.getInstanceId()) { if (metadataManager.containServiceMetadata(expiredInfo.getService())) { - metadataOperateService.deleteInstanceMetadata(expiredInfo.getService(), expiredInfo.getInstanceId()); + metadataOperateService.deleteServiceMetadata(expiredInfo.getService()); } } else { if (metadataManager.containInstanceMetadata(expiredInfo.getService(), expiredInfo.getInstanceId())) { - metadataOperateService.deleteServiceMetadata(expiredInfo.getService()); + metadataOperateService.deleteInstanceMetadata(expiredInfo.getService(), expiredInfo.getInstanceId()); } } }