Please review "[fix][broker] Fix corrupted topic policies issues with sequential topic policy updates #24427", https://github.com/apache/pulsar/pull/24427 . It implements
"PIP-428: Change TopicPoliciesService interface to fix consistency issues"
This addresses severe issues that can occur when topic policies get corrupted in unexpected ways.
For example, if the topic retention policy gets updated in 2 subsequent calls, it's possible that the first update is lost.
Let's say that you update the topic retention policy in this way:
pulsar-admin topics set-retention -t -1 mytopic
pulsar-admin topics set-retention -s -1 mytopic
the update for retention time could be lost. It might also result in the case that the update for retention size is lost.