You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Lee (JIRA)" <ji...@apache.org> on 2010/01/06 04:15:54 UTC

[jira] Created: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

bootstrapping does not work properly using multiple key space
-------------------------------------------------------------

                 Key: CASSANDRA-673
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 0.5
         Environment: 1.	cluster has at least one empty key-space
2.	one node be added into cluster to do bootstrap

            Reporter: Michael Lee
             Fix For: 0.9


when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:

StreamInitiateVerbHandler.doVerb:
......
                if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
                {
                    if (logger.isDebugEnabled())
                        logger.debug("no data needed from " + message.getFrom());
                    StorageService.instance().removeBootstrapSource(message.getFrom());
                    return;
                }
......
If list of bootstrap sources is empty, E will finish bootstrapping

So, the result is: E get nothing from source A, B, even KS2 has lots of data.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

Posted by "Jaakko Laine (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800690#action_12800690 ] 

Jaakko Laine commented on CASSANDRA-673:
----------------------------------------

System table should probably not be included in the transfer?


> bootstrapping does not work properly using multiple key space
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-673
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.	cluster has at least one empty key-space
> 2.	one node be added into cluster to do bootstrap
>            Reporter: Michael Lee
>            Assignee: Jaakko Laine
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 0001-keep-track-of-table-and-node-while-bootstrapping.patch
>
>
> when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
> Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
> Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
> when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:
> StreamInitiateVerbHandler.doVerb:
> ......
>                 if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
>                 {
>                     if (logger.isDebugEnabled())
>                         logger.debug("no data needed from " + message.getFrom());
>                     StorageService.instance().removeBootstrapSource(message.getFrom());
>                     return;
>                 }
> ......
> If list of bootstrap sources is empty, E will finish bootstrapping
> So, the result is: E get nothing from source A, B, even KS2 has lots of data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

Posted by "Jaakko Laine (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801120#action_12801120 ] 

Jaakko Laine commented on CASSANDRA-673:
----------------------------------------

+1

> bootstrapping does not work properly using multiple key space
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-673
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.	cluster has at least one empty key-space
> 2.	one node be added into cluster to do bootstrap
>            Reporter: Michael Lee
>            Assignee: Jaakko Laine
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 0001-keep-track-of-table-and-node-while-bootstrapping.patch, 0002-do-not-include-system-tables-when-setting-bootstrap-.patch
>
>
> when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
> Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
> Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
> when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:
> StreamInitiateVerbHandler.doVerb:
> ......
>                 if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
>                 {
>                     if (logger.isDebugEnabled())
>                         logger.debug("no data needed from " + message.getFrom());
>                     StorageService.instance().removeBootstrapSource(message.getFrom());
>                     return;
>                 }
> ......
> If list of bootstrap sources is empty, E will finish bootstrapping
> So, the result is: E get nothing from source A, B, even KS2 has lots of data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

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

Gary Dusbabek updated CASSANDRA-673:
------------------------------------

    Attachment: 0001-keep-track-of-table-and-node-while-bootstrapping.patch

Tracks bootstrap sources on a node+table basis. Puts the table name as a message header for the case when there are no stream contexts to extract it from.

> bootstrapping does not work properly using multiple key space
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-673
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.	cluster has at least one empty key-space
> 2.	one node be added into cluster to do bootstrap
>            Reporter: Michael Lee
>            Assignee: Jaakko Laine
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 0001-keep-track-of-table-and-node-while-bootstrapping.patch
>
>
> when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
> Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
> Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
> when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:
> StreamInitiateVerbHandler.doVerb:
> ......
>                 if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
>                 {
>                     if (logger.isDebugEnabled())
>                         logger.debug("no data needed from " + message.getFrom());
>                     StorageService.instance().removeBootstrapSource(message.getFrom());
>                     return;
>                 }
> ......
> If list of bootstrap sources is empty, E will finish bootstrapping
> So, the result is: E get nothing from source A, B, even KS2 has lots of data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

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

Jaakko Laine reassigned CASSANDRA-673:
--------------------------------------

    Assignee: Jaakko Laine

> bootstrapping does not work properly using multiple key space
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-673
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.	cluster has at least one empty key-space
> 2.	one node be added into cluster to do bootstrap
>            Reporter: Michael Lee
>            Assignee: Jaakko Laine
>            Priority: Minor
>             Fix For: 0.5
>
>
> when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
> Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
> Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
> when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:
> StreamInitiateVerbHandler.doVerb:
> ......
>                 if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
>                 {
>                     if (logger.isDebugEnabled())
>                         logger.debug("no data needed from " + message.getFrom());
>                     StorageService.instance().removeBootstrapSource(message.getFrom());
>                     return;
>                 }
> ......
> If list of bootstrap sources is empty, E will finish bootstrapping
> So, the result is: E get nothing from source A, B, even KS2 has lots of data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

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

Jonathan Ellis updated CASSANDRA-673:
-------------------------------------

        Fix Version/s:     (was: 0.9)
                       0.5
             Priority: Minor  (was: Major)
    Affects Version/s:     (was: 0.5)

> bootstrapping does not work properly using multiple key space
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-673
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.	cluster has at least one empty key-space
> 2.	one node be added into cluster to do bootstrap
>            Reporter: Michael Lee
>            Priority: Minor
>             Fix For: 0.5
>
>
> when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
> Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
> Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
> when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:
> StreamInitiateVerbHandler.doVerb:
> ......
>                 if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
>                 {
>                     if (logger.isDebugEnabled())
>                         logger.debug("no data needed from " + message.getFrom());
>                     StorageService.instance().removeBootstrapSource(message.getFrom());
>                     return;
>                 }
> ......
> If list of bootstrap sources is empty, E will finish bootstrapping
> So, the result is: E get nothing from source A, B, even KS2 has lots of data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

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

Gary Dusbabek updated CASSANDRA-673:
------------------------------------

    Attachment: 0002-do-not-include-system-tables-when-setting-bootstrap-.patch

> bootstrapping does not work properly using multiple key space
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-673
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.	cluster has at least one empty key-space
> 2.	one node be added into cluster to do bootstrap
>            Reporter: Michael Lee
>            Assignee: Jaakko Laine
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 0001-keep-track-of-table-and-node-while-bootstrapping.patch, 0002-do-not-include-system-tables-when-setting-bootstrap-.patch
>
>
> when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
> Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
> Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
> when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:
> StreamInitiateVerbHandler.doVerb:
> ......
>                 if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
>                 {
>                     if (logger.isDebugEnabled())
>                         logger.debug("no data needed from " + message.getFrom());
>                     StorageService.instance().removeBootstrapSource(message.getFrom());
>                     return;
>                 }
> ......
> If list of bootstrap sources is empty, E will finish bootstrapping
> So, the result is: E get nothing from source A, B, even KS2 has lots of data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-673) bootstrapping does not work properly using multiple key space

Posted by "Gary Dusbabek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800692#action_12800692 ] 

Gary Dusbabek commented on CASSANDRA-673:
-----------------------------------------

Good catch.  I'll put together another patch.

> bootstrapping does not work properly using multiple key space
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-673
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-673
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: 1.	cluster has at least one empty key-space
> 2.	one node be added into cluster to do bootstrap
>            Reporter: Michael Lee
>            Assignee: Jaakko Laine
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 0001-keep-track-of-table-and-node-while-bootstrapping.patch
>
>
> when use multiple key-spaces, and one key-space has no SSTable, then bootstrap may not work right.
> Say nodes A, B, C, D have key spaces "KS1" and "KS2", KS1 is empty, now add empty node E into cluster.
> Suppose E decide to drag data from A and B(bootstrap source), E will send range to A and B, and A, B will scan all key-spaces they got and send ack to E, which contains list of key-space name(StreamContextManager.StreamContext),
> when E get ack from A and B, it scan this list, but when encounter first empty key-space, it will stop and remove node from bootstrap sources list:
> StreamInitiateVerbHandler.doVerb:
> ......
>                 if (streamContexts.length == 0 && StorageService.instance().isBootstrapMode())
>                 {
>                     if (logger.isDebugEnabled())
>                         logger.debug("no data needed from " + message.getFrom());
>                     StorageService.instance().removeBootstrapSource(message.getFrom());
>                     return;
>                 }
> ......
> If list of bootstrap sources is empty, E will finish bootstrapping
> So, the result is: E get nothing from source A, B, even KS2 has lots of data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.