fix: fix loadbalancer metadata type. (#1626)

pull/1630/head
Fishtail 3 months ago committed by GitHub
parent 0429e7ebd7
commit dbcb9a3c1f
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/1605) - [feat:support config all recover enabled.](https://github.com/Tencent/spring-cloud-tencent/pull/1605)
- [feat:support stat reporting path aggregation.](https://github.com/Tencent/spring-cloud-tencent/pull/1609) - [feat:support stat reporting path aggregation.](https://github.com/Tencent/spring-cloud-tencent/pull/1609)
- [feat:support instance detect.](https://github.com/Tencent/spring-cloud-tencent/pull/1619) - [feat:support instance detect.](https://github.com/Tencent/spring-cloud-tencent/pull/1619)
- [fix: fix loadbalancer metadata type.](https://github.com/Tencent/spring-cloud-tencent/pull/1626)

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