fix: fix loadbalancer metadata type. (#1625)

pull/1640/head
Fishtail 3 months ago committed by GitHub
parent 3a81fb7b32
commit c9e3219796
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -9,3 +9,4 @@
- [feat:support config all recover enabled.](https://github.com/Tencent/spring-cloud-tencent/pull/1604) - [feat:support config all recover enabled.](https://github.com/Tencent/spring-cloud-tencent/pull/1604)
- [feat:support stat reporting path aggregation.](https://github.com/Tencent/spring-cloud-tencent/pull/1608) - [feat:support stat reporting path aggregation.](https://github.com/Tencent/spring-cloud-tencent/pull/1608)
- [feat:support instance detect.](https://github.com/Tencent/spring-cloud-tencent/pull/1617) - [feat:support instance detect.](https://github.com/Tencent/spring-cloud-tencent/pull/1617)
- [fix: fix loadbalancer metadata type.](https://github.com/Tencent/spring-cloud-tencent/pull/1625)

@ -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