Skip to content

Commit

Permalink
instance 命名空间恢复从 serviceKey 获取,即实例级熔断的治理规则适用 serviceKey 对应 namespace 的 (
Browse files Browse the repository at this point in the history
#580)

Co-authored-by: shedfreewu <shedfreewu@tencent.com>
  • Loading branch information
shedfreewu and shedfreez authored Jan 20, 2025
1 parent 730148c commit f7ca3c1
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package com.tencent.polaris.client.pojo;

import com.google.protobuf.StringValue;
import com.google.protobuf.UInt32Value;
import com.tencent.polaris.api.pojo.CircuitBreakerStatus;
import com.tencent.polaris.api.pojo.DetectResult;
Expand All @@ -31,7 +30,6 @@
import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

/**
* 通过PB对象封装的实例信息
Expand Down Expand Up @@ -80,8 +78,7 @@ public int hashCode() {

@Override
public String getNamespace() {
return Optional.of(instance).map(ServiceProto.Instance::getNamespace).
map(StringValue::getValue).orElse(serviceKey.getNamespace());
return serviceKey.getNamespace();
}

@Override
Expand Down

0 comments on commit f7ca3c1

Please sign in to comment.