AnonHxy commented on code in PR #17238:
URL: https://github.com/apache/pulsar/pull/17238#discussion_r953642381
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -601,6 +602,60 @@ private CompletableFuture<Map<String, String>>
getPropertiesAsync() {
});
}
+ protected CompletableFuture<Void> internalUpdatePropertiesAsync(boolean
authoritative,
+
Map<String, String> properties) {
+ if (properties == null || properties.isEmpty()) {
+ log.warn("[{}] [{}] properties is empty, ignore update",
clientAppId(), topicName);
+ return CompletableFuture.completedFuture(null);
Review Comment:
Users can set the value as null to make the key invalidte. Here we don't
delete the key because I think it's better to keep same action as what
non-partitioned topic do, see L3915 and L3922, the `delete` flag(the 2nd
params) is false:
https://github.com/apache/pulsar/blob/05a2ea87371783000f496ce8103c0ac372e4a8fe/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L3912-L3923
And if we have to delete the key, I think it's better add another API like
`deleteProperty` :) @Jason918
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]