This commit is contained in:
parent
29e799fd44
commit
22393e4456
@ -311,6 +311,10 @@ public class DistroConsistencyServiceImpl implements EphemeralConsistencyService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean processVerifyData(DistroData distroData, String sourceAddress) {
|
public boolean processVerifyData(DistroData distroData, String sourceAddress) {
|
||||||
|
// If upgrade to 2.0.X, do not verify for v1.
|
||||||
|
if (ApplicationUtils.getBean(UpgradeJudgement.class).isUseGrpcFeatures()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
DistroHttpData distroHttpData = (DistroHttpData) distroData;
|
DistroHttpData distroHttpData = (DistroHttpData) distroData;
|
||||||
Map<String, String> verifyData = (Map<String, String>) distroHttpData.getDeserializedContent();
|
Map<String, String> verifyData = (Map<String, String>) distroHttpData.getDeserializedContent();
|
||||||
onReceiveChecksums(verifyData, sourceAddress);
|
onReceiveChecksums(verifyData, sourceAddress);
|
||||||
|
@ -26,6 +26,7 @@ import com.alibaba.nacos.naming.consistency.KeyBuilder;
|
|||||||
import com.alibaba.nacos.naming.consistency.ephemeral.distro.DataStore;
|
import com.alibaba.nacos.naming.consistency.ephemeral.distro.DataStore;
|
||||||
import com.alibaba.nacos.naming.consistency.ephemeral.distro.combined.DistroHttpCombinedKey;
|
import com.alibaba.nacos.naming.consistency.ephemeral.distro.combined.DistroHttpCombinedKey;
|
||||||
import com.alibaba.nacos.naming.core.DistroMapper;
|
import com.alibaba.nacos.naming.core.DistroMapper;
|
||||||
|
import com.alibaba.nacos.naming.core.v2.upgrade.UpgradeJudgement;
|
||||||
import com.alibaba.nacos.sys.utils.ApplicationUtils;
|
import com.alibaba.nacos.sys.utils.ApplicationUtils;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -84,6 +85,10 @@ public class DistroDataStorageImpl implements DistroDataStorage {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DistroData> getVerifyData() {
|
public List<DistroData> getVerifyData() {
|
||||||
|
// If upgrade to 2.0.X, do not verify for v1.
|
||||||
|
if (ApplicationUtils.getBean(UpgradeJudgement.class).isUseGrpcFeatures()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
Map<String, String> keyChecksums = new HashMap<>(64);
|
Map<String, String> keyChecksums = new HashMap<>(64);
|
||||||
for (String key : dataStore.keys()) {
|
for (String key : dataStore.keys()) {
|
||||||
if (!distroMapper.responsible(KeyBuilder.getServiceName(key))) {
|
if (!distroMapper.responsible(KeyBuilder.getServiceName(key))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user