You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/22 06:32:14 UTC

[GitHub] [pulsar] merlimat opened a new pull request #11012: PIP-45: Migrate OwnershipCache to use MetadataStore

merlimat opened a new pull request #11012:
URL: https://github.com/apache/pulsar/pull/11012


   ### Motivation
   
   Migrate OwnershipCache logic for acquiring and watching bundles ownership to use ResourceLocks from the MetadataStore interface.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Anonymitaet commented on pull request #11012: PIP-45: Migrate OwnershipCache to use MetadataStore

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11012:
URL: https://github.com/apache/pulsar/pull/11012#issuecomment-866488639


   @merlimat thanks for your contribution. For this PR, do we need to update docs?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #11012: PIP-45: Migrate OwnershipCache to use MetadataStore

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #11012:
URL: https://github.com/apache/pulsar/pull/11012#discussion_r657880079



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -631,168 +631,146 @@ protected void handleProducerRemoved(Producer producer) {
                                                  Map<String, String> metadata, boolean readCompacted,
                                                  InitialPosition initialPosition,
                                                  long startMessageRollbackDurationSec,
-                                                 boolean replicatedSubscriptionState,
+                                                 boolean replicatedSubscriptionStateArg,
                                                  KeySharedMeta keySharedMeta) {
+        return brokerService.checkTopicNsOwnership(getName()).thenCompose(__ -> {
+            if (readCompacted && !(subType == SubType.Failover || subType == SubType.Exclusive)) {

Review comment:
       Done




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #11012: PIP-45: Migrate OwnershipCache to use MetadataStore

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #11012:
URL: https://github.com/apache/pulsar/pull/11012#discussion_r656086151



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -631,168 +631,146 @@ protected void handleProducerRemoved(Producer producer) {
                                                  Map<String, String> metadata, boolean readCompacted,
                                                  InitialPosition initialPosition,
                                                  long startMessageRollbackDurationSec,
-                                                 boolean replicatedSubscriptionState,
+                                                 boolean replicatedSubscriptionStateArg,
                                                  KeySharedMeta keySharedMeta) {
+        return brokerService.checkTopicNsOwnership(getName()).thenCompose(__ -> {
+            if (readCompacted && !(subType == SubType.Failover || subType == SubType.Exclusive)) {

Review comment:
       we could move this validation outside of the `checkTopicNsOwnership` block.
   not a big deal, it is something that does not happen in the happy path




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on pull request #11012: PIP-45: Migrate OwnershipCache to use MetadataStore

Posted by GitBox <gi...@apache.org>.
merlimat commented on pull request #11012:
URL: https://github.com/apache/pulsar/pull/11012#issuecomment-867198628


   > @merlimat thanks for your contribution. For this PR, do we need to update docs?
   
   No docs updates, this is just an internal refactoring.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #11012: PIP-45: Migrate OwnershipCache to use MetadataStore

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #11012:
URL: https://github.com/apache/pulsar/pull/11012


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on pull request #11012: PIP-45: Migrate OwnershipCache to use MetadataStore

Posted by GitBox <gi...@apache.org>.
merlimat commented on pull request #11012:
URL: https://github.com/apache/pulsar/pull/11012#issuecomment-873031392


   > I see that the patch contains the fix on MLTransactionLog
   
   Yes, I've added here to make sure all the other tests were fine. I'll rebase on master once the other one is merged
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org