You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Aniruddha (JIRA)" <ji...@apache.org> on 2012/05/12 01:13:52 UTC

[jira] [Created] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Aniruddha created BOOKKEEPER-256:
------------------------------------

             Summary: Update remote component sequence IDs only for messages from the source region
                 Key: BOOKKEEPER-256
                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
             Project: Bookkeeper
          Issue Type: Improvement
          Components: hedwig-server
    Affects Versions: 4.1.0
            Reporter: Aniruddha
            Assignee: Aniruddha
            Priority: Minor
             Fix For: 4.1.0


In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment: BK-256-v1.patch
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273783#comment-13273783 ] 

Sijie Guo edited comment on BOOKKEEPER-256 at 5/12/12 1:17 AM:
---------------------------------------------------------------

just some comments:

1) seems that the line you changed in RegionManager is not used. so my question is how we propagate the seqid from src region to remote components list, the takeRegionMaximum() might not work correctly? if I missed anything, please correct me.

2) so you just improved the behavior of takeRegionMaximum, so it just take the maximum id for source region, right? 

{code}
+    public static void takeRegionSpecificMaximum(MessageSeqId.Builder newIdBuilder, MessageSeqId id1, MessageSeqId id2, ByteString srcRegion) {
+        Map<ByteString, RegionSpecificSeqId> id2Map = MessageIdUtils.inMapForm(id2);
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
+                RegionSpecificSeqId rssid2 = id2Map.get(srcRegion);
+                if (rssid2 != null) {
+                    newIdBuilder.addRemoteComponents((rssid1.getSeqId() > rssid2.getSeqId() ? rssid1 : rssid2));
+                } else {
+                    newIdBuilder.addRemoteComponents(rssid1);
+                }
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
+        for (RegionSpecificSeqId rssid2 : id2Map.values()) {
+            if (rssid2.getRegion().equals(srcRegion)) {
+                newIdBuilder.addRemoteComponents(rssid2);
+            }
+        }
+    }
{code} 

so the id2 is srcRegion seq id, right? If so, we don't need to check region specific of src region in id2.
it could be 

{code}
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
                 RegionSpecificSeqId newRssid = rssid1;
                 if (rssid1.getSeqId() < id2.getLocalComponent()) {
                     newRssid = ... // build region specific seq id here.
                 }
                 newIdBuilder.addRemoteComponents(newRssid);
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
{code}
                
      was (Author: hustlmsp):
    just some comments:

1) seems that the line you changed in RegionManager is not used. so my question is how we propagate the seqid from src region to remote components list, the takeRegionMaximum() might not work correctly? if I missed anything, please correct me.

2) so you just improved the behavior of takeRegionMaximum, so it just take the maximum id for source region, right? 

{quote}
+    public static void takeRegionSpecificMaximum(MessageSeqId.Builder newIdBuilder, MessageSeqId id1, MessageSeqId id2, ByteString srcRegion) {
+        Map<ByteString, RegionSpecificSeqId> id2Map = MessageIdUtils.inMapForm(id2);
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
+                RegionSpecificSeqId rssid2 = id2Map.get(srcRegion);
+                if (rssid2 != null) {
+                    newIdBuilder.addRemoteComponents((rssid1.getSeqId() > rssid2.getSeqId() ? rssid1 : rssid2));
+                } else {
+                    newIdBuilder.addRemoteComponents(rssid1);
+                }
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
+        for (RegionSpecificSeqId rssid2 : id2Map.values()) {
+            if (rssid2.getRegion().equals(srcRegion)) {
+                newIdBuilder.addRemoteComponents(rssid2);
+            }
+        }
+    }
{quote} 

so the id2 is srcRegion seq id, right? If so, we don't need to check region specific of src region in id2.
it could be 

{code}
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
                 RegionSpecificSeqId newRssid = rssid1;
                 if (rssid1.getSeqId() < id2.getLocalComponent()) {
                     newRssid = ... // build region specific seq id here.
                 }
                 newIdBuilder.addRemoteComponents(newRssid);
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
{code}
                  
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment: BK-256.patch
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273793#comment-13273793 ] 

Sijie Guo commented on BOOKKEEPER-256:
--------------------------------------

@Aniruddha, thanks for clarification.

> The order of the Message sequence IDs would not matter if we used takeRegionMaximum, but with would matter when used with the new code.

yeah, ur right.

>

How about the proposal in my previous comment? We remove the line in region manager and improve takeRegionSpecificManager as I suggested. 

>From you new patch, the message would be build twice. once in region manager, then in persistence manager. As what I suggested, we don't need to build a new message in region manager, which just propagate seq id to remote components list. we could avoid it by building it when takeRegionSpecificMaxmimum, right?

How is your opinion?
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment: BK-256-v1.patch
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment:     (was: BK-256.patch)
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273786#comment-13273786 ] 

Aniruddha edited comment on BOOKKEEPER-256 at 5/12/12 1:36 AM:
---------------------------------------------------------------

@Sijie, the code handles the condition when the message might not have it's local component in sync with the original message. The RegionManager builds the message passed on to the persistence manager. While doing this, I believe it resets the message ID. 

The order of the Message sequence IDs would not matter if we used takeRegionMaximum, but with would matter when used with the new code. 

Also, we can remove takeRegionMaximum if there are no plans to use it somewhere else. 
                
      was (Author: i0exception):
    @Sijie, the code handles the condition when the message might not have it's local component in sync with the original message. The RegionManager builds the message passed on to the persistence manager. While doing this, I believe it resets the message ID. 
                  
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274544#comment-13274544 ] 

Sijie Guo commented on BOOKKEEPER-256:
--------------------------------------

lgtm +1
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256-v2.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment: BK-256.patch

Sorry for the delay. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256.patch, BK-256.patch, BK-256-v1.patch, BK-256-v2.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455490#comment-13455490 ] 

Sijie Guo commented on BOOKKEEPER-256:
--------------------------------------

 I will try to follow up today. just one suggestion: when a patch is ready for review, could you also attach the patch to this jira and change the status to patch available? since sometimes the reviewers might miss the activities of a jira, when he looks all the patch available jiras, he could find your patch to review.
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256.patch, BK-256.patch, BK-256-v1.patch, BK-256-v2.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.
> Review board link : https://reviews.apache.org/r/6789/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508262#comment-13508262 ] 

Flavio Junqueira commented on BOOKKEEPER-256:
---------------------------------------------

Hi guys, What's the status here? Are we fixing this one for 4.2.0?
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256.patch, BK-256.patch, BK-256-v1.patch, BK-256-v2.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.
> Review board link : https://reviews.apache.org/r/6789/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273785#comment-13273785 ] 

Aniruddha commented on BOOKKEEPER-256:
--------------------------------------

I have updated the patch to address Hyun's comments.
1) Yes, seems like I had attached the wrong patch file. This is fixed. 
2) This should probably go in a new ticket. 
3) Changed this, I was under the impression that Message.newBuilder modified the argument. 
4) Done. 
5) Agreed. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment: BK-256.patch
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment: BK-256-v2.patch

Shortened long lines. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256-v2.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274591#comment-13274591 ] 

Ivan Kelly commented on BOOKKEEPER-256:
---------------------------------------

Testing is a bit awkward for this, but what you could do is use something like jOOR to get access to
PubSubServer.rm.clients and then for each client, access the topicSubscriber2Channel in the subscribers, to get at the channels, which then can be set to read only. 

This would effectively partition the PubSubServer from the other hubs in the test system. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256-v2.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273783#comment-13273783 ] 

Sijie Guo edited comment on BOOKKEEPER-256 at 5/12/12 1:23 AM:
---------------------------------------------------------------

just some comments:

1) seems that the line you changed in RegionManager is not used. so my question is how we propagate the seqid from src region to remote components list, the takeRegionMaximum() might not work correctly? if I missed anything, please correct me.

2) you just improved the behavior of takeRegionMaximum to make it just take the maximum id for source region, right? 

{code}
+    public static void takeRegionSpecificMaximum(MessageSeqId.Builder newIdBuilder, MessageSeqId id1, MessageSeqId id2, ByteString srcRegion) {
+        Map<ByteString, RegionSpecificSeqId> id2Map = MessageIdUtils.inMapForm(id2);
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
+                RegionSpecificSeqId rssid2 = id2Map.get(srcRegion);
+                if (rssid2 != null) {
+                    newIdBuilder.addRemoteComponents((rssid1.getSeqId() > rssid2.getSeqId() ? rssid1 : rssid2));
+                } else {
+                    newIdBuilder.addRemoteComponents(rssid1);
+                }
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
+        for (RegionSpecificSeqId rssid2 : id2Map.values()) {
+            if (rssid2.getRegion().equals(srcRegion)) {
+                newIdBuilder.addRemoteComponents(rssid2);
+            }
+        }
+    }
{code} 

as the patch indicated that the id2 is srcRegion seq id. If so, we don't need to check region specific of src region in id2. we could improve it as below, which could fix the possible issue in my 1) comment.

Beside that, the variable name of takeRegionSpecificMaximum could be improved as takeRegionSpecificMaximum(newBuilder, lastPushSeqId, srcRegionSeqId, srcRegion) to make it more clear. Also if takeRegionMaximum is replaced by takeRegionSpecificMaximum, we could remove takeRegionMaximum.

{code}
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
                 RegionSpecificSeqId newRssid = rssid1;
                 if (rssid1.getSeqId() < id2.getLocalComponent()) {
                     newRssid = ... // build region specific seq id here.
                 }
                 newIdBuilder.addRemoteComponents(newRssid);
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
{code}

BTW, thanks for changing the order of two seq id in LocalDBPersistenceManager, it seems it is a potential bug, right?
                
      was (Author: hustlmsp):
    just some comments:

1) seems that the line you changed in RegionManager is not used. so my question is how we propagate the seqid from src region to remote components list, the takeRegionMaximum() might not work correctly? if I missed anything, please correct me.

2) so you just improved the behavior of takeRegionMaximum, so it just take the maximum id for source region, right? 

{code}
+    public static void takeRegionSpecificMaximum(MessageSeqId.Builder newIdBuilder, MessageSeqId id1, MessageSeqId id2, ByteString srcRegion) {
+        Map<ByteString, RegionSpecificSeqId> id2Map = MessageIdUtils.inMapForm(id2);
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
+                RegionSpecificSeqId rssid2 = id2Map.get(srcRegion);
+                if (rssid2 != null) {
+                    newIdBuilder.addRemoteComponents((rssid1.getSeqId() > rssid2.getSeqId() ? rssid1 : rssid2));
+                } else {
+                    newIdBuilder.addRemoteComponents(rssid1);
+                }
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
+        for (RegionSpecificSeqId rssid2 : id2Map.values()) {
+            if (rssid2.getRegion().equals(srcRegion)) {
+                newIdBuilder.addRemoteComponents(rssid2);
+            }
+        }
+    }
{code} 

so the id2 is srcRegion seq id, right? If so, we don't need to check region specific of src region in id2.
it could be 

{code}
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
                 RegionSpecificSeqId newRssid = rssid1;
                 if (rssid1.getSeqId() < id2.getLocalComponent()) {
                     newRssid = ... // build region specific seq id here.
                 }
                 newIdBuilder.addRemoteComponents(newRssid);
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
{code}
                  
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276155#comment-13276155 ] 

Aniruddha commented on BOOKKEEPER-256:
--------------------------------------

Thanks for reviewing. I'll take a look at what Ivan suggested to come up with unit tests. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256-v2.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Description: 
In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 

Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

  was:In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 

    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273783#comment-13273783 ] 

Sijie Guo commented on BOOKKEEPER-256:
--------------------------------------

just some comments:

1) seems that the line you changed in RegionManager is not used. so my question is how we propagate the seqid from src region to remote components list, the takeRegionMaximum() might not work correctly? if I missed anything, please correct me.

2) so you just improved the behavior of takeRegionMaximum, so it just take the maximum id for source region, right? 

{quote}
+    public static void takeRegionSpecificMaximum(MessageSeqId.Builder newIdBuilder, MessageSeqId id1, MessageSeqId id2, ByteString srcRegion) {
+        Map<ByteString, RegionSpecificSeqId> id2Map = MessageIdUtils.inMapForm(id2);
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
+                RegionSpecificSeqId rssid2 = id2Map.get(srcRegion);
+                if (rssid2 != null) {
+                    newIdBuilder.addRemoteComponents((rssid1.getSeqId() > rssid2.getSeqId() ? rssid1 : rssid2));
+                } else {
+                    newIdBuilder.addRemoteComponents(rssid1);
+                }
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
+        for (RegionSpecificSeqId rssid2 : id2Map.values()) {
+            if (rssid2.getRegion().equals(srcRegion)) {
+                newIdBuilder.addRemoteComponents(rssid2);
+            }
+        }
+    }
{quote} 

so the id2 is srcRegion seq id, right? If so, we don't need to check region specific of src region in id2.
it could be 

{code}
+        for (RegionSpecificSeqId rssid1 : id1.getRemoteComponentsList()) {
+            if(rssid1.getRegion().equals(srcRegion)) {
                 RegionSpecificSeqId newRssid = rssid1;
                 if (rssid1.getSeqId() < id2.getLocalComponent()) {
                     newRssid = ... // build region specific seq id here.
                 }
                 newIdBuilder.addRemoteComponents(newRssid);
+            } else {
+                newIdBuilder.addRemoteComponents(rssid1);
+            }
+            id2Map.remove(rssid1.getRegion());
+        }
{code}
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283630#comment-13283630 ] 

Aniruddha commented on BOOKKEEPER-256:
--------------------------------------

Yes, moving to 4.2.0 is fine. Will update this Jira soon. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256-v1.patch, BK-256-v2.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Junqueira updated BOOKKEEPER-256:
----------------------------------------

    Affects Version/s: 4.0.0
        Fix Version/s:     (was: 4.1.0)
                       4.2.0

There hasn't been recent activity in this jira, so I propose to move it to 4.2.0. Is it ok?
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256-v1.patch, BK-256-v2.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment:     (was: BK-256-v1.patch)
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274459#comment-13274459 ] 

Sijie Guo commented on BOOKKEEPER-256:
--------------------------------------

Thanks, Aniruddha.

the patch looks good. just one comment about format, it would be better to fold a long line into 2 or more shorter lines.

besides that, I would like to ask Ivan to take a look at this patch, since he involved in the discussion. 


                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Uma Maheswara Rao G (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274460#comment-13274460 ] 

Uma Maheswara Rao G commented on BOOKKEEPER-256:
------------------------------------------------

@Aniruddha, Please take a look at this [info |https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute]. This will help you to format it correctly as per BK guidlines.
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274550#comment-13274550 ] 

Ivan Kelly commented on BOOKKEEPER-256:
---------------------------------------

The patch looks correct. It would be good to have a test case or two to verify that it is though. Could you add some checks in TestHedwigRegion?
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256-v2.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454993#comment-13454993 ] 

Aniruddha commented on BOOKKEEPER-256:
--------------------------------------

Could someone take a look at this? :)
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256.patch, BK-256.patch, BK-256-v1.patch, BK-256-v2.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.
> Review board link : https://reviews.apache.org/r/6789/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274425#comment-13274425 ] 

Aniruddha commented on BOOKKEEPER-256:
--------------------------------------

Sijie, I've updated the patch to incorporate your suggestions. Please take a look. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256-v1.patch, BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Description: 
In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 

Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

Review board link : https://reviews.apache.org/r/6789/

  was:
In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 

Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256.patch, BK-256.patch, BK-256-v1.patch, BK-256-v2.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.
> Review board link : https://reviews.apache.org/r/6789/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273786#comment-13273786 ] 

Aniruddha commented on BOOKKEEPER-256:
--------------------------------------

@Sijie, the code handles the condition when the message might not have it's local component in sync with the original message. The RegionManager builds the message passed on to the persistence manager. While doing this, I believe it resets the message ID. 
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment: BK-256.patch
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aniruddha updated BOOKKEEPER-256:
---------------------------------

    Attachment:     (was: BK-256.patch)
    
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477144#comment-13477144 ] 

Ivan Kelly commented on BOOKKEEPER-256:
---------------------------------------

This patch looks like it's really to go in except for one question about one comment on reviewboard. [~i0exception] Could you take a look at the question, and then we could get this pushed in? (also may need a rebase).

Tests look good btw :)
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.2.0
>
>         Attachments: BK-256.patch, BK-256.patch, BK-256-v1.patch, BK-256-v2.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.
> Review board link : https://reviews.apache.org/r/6789/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (BOOKKEEPER-256) Update remote component sequence IDs only for messages from the source region

Posted by "Hyun Goo Kang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273736#comment-13273736 ] 

Hyun Goo Kang commented on BOOKKEEPER-256:
------------------------------------------

Couple comments:
- In takeRegionSpecificMaximum(), it looks like we would take a component from id2 regardless of its region, if its corresponding component does not exist in id1. Is that what you want?

- This is out of scope, but I guess we could update the message's seq-id after you merge the two seq-ids in LocalDBPersistenceManager::persistMessage.

- This is out of scope again, but it looks like the new message builder that merges two ids is never used (RegionManager::doRemoteSubscribe, line 214).

- It looks like your one-line fix in RegionManager.java would be sufficient for this issue. The existing 'takeRegionMaximum' should work just fine with the new sequence-ids that contains only the srcRegion component. Could you also add some comment to the line you changed in RegionManager.java to clarify why we would want to propagate only the srcRegion component?

- Is 'takeRegionMaximum' doesn't seem to be used anywhere else. We could remove it if we decide to keep the 'takeRegionSpecificMaximum' method.
                
> Update remote component sequence IDs only for messages from the source region
> -----------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-256
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-256
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: hedwig-server
>    Affects Versions: 4.1.0
>            Reporter: Aniruddha
>            Assignee: Aniruddha
>            Priority: Minor
>             Fix For: 4.1.0
>
>         Attachments: BK-256.patch
>
>
> In the current setup, remote components for a message being persisted don't give any meaningful information about the number of messages the hub has received for that topic from other regions. The provided patch fixes this by updating the remote component of the locally persisted message for a region X only if the message received by the RegionManager originates from region X. 
> Edit - You can take a look at the discussion at http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201205.mbox/%3cCAOLhyDTEm5=p8eMD8XmVCY_6ktB40RQx6dWWY50ARbAEbdgtsQ@mail.gmail.com%3e for context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira