fix: fix loadbalancer metadata type. (#1622)

pull/1631/head
Fishtail 3 months ago committed by GitHub
parent ebca68a34c
commit 7ec31741fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -10,3 +10,4 @@
- [feat:support config all recover enabled.](https://github.com/Tencent/spring-cloud-tencent/pull/1606) - [feat:support config all recover enabled.](https://github.com/Tencent/spring-cloud-tencent/pull/1606)
- [feat:support stat reporting path aggregation.](https://github.com/Tencent/spring-cloud-tencent/pull/1610) - [feat:support stat reporting path aggregation.](https://github.com/Tencent/spring-cloud-tencent/pull/1610)
- [feat:support instance detect.](https://github.com/Tencent/spring-cloud-tencent/pull/1620) - [feat:support instance detect.](https://github.com/Tencent/spring-cloud-tencent/pull/1620)
- [fix: fix loadbalancer metadata type.](https://github.com/Tencent/spring-cloud-tencent/pull/1622)

@ -229,7 +229,7 @@ public class MetadataContext extends com.tencent.polaris.metadata.core.manager.M
} }
public Map<String, Object> getLoadbalancerMetadata() { public Map<String, Object> getLoadbalancerMetadata() {
MetadataContainer metadataContainer = getMetadataContainer(MetadataType.APPLICATION, false); MetadataContainer metadataContainer = getMetadataContainer(MetadataType.CUSTOM, false);
MetadataValue metadataValue = metadataContainer.getMetadataValue(FRAGMENT_LB_METADATA); MetadataValue metadataValue = metadataContainer.getMetadataValue(FRAGMENT_LB_METADATA);
Map<String, Object> values = new HashMap<>(); Map<String, Object> values = new HashMap<>();
if (metadataValue instanceof MetadataMapValue) { if (metadataValue instanceof MetadataMapValue) {
@ -248,7 +248,7 @@ public class MetadataContext extends com.tencent.polaris.metadata.core.manager.M
} }
public void setLoadbalancer(String key, Object value) { public void setLoadbalancer(String key, Object value) {
MetadataContainer metadataContainer = getMetadataContainer(MetadataType.APPLICATION, false); MetadataContainer metadataContainer = getMetadataContainer(MetadataType.CUSTOM, false);
metadataContainer.putMetadataMapObjectValue(FRAGMENT_LB_METADATA, key, value); metadataContainer.putMetadataMapObjectValue(FRAGMENT_LB_METADATA, key, value);
} }

Loading…
Cancel
Save