[jira] [Updated] (CASSANDRA-12935) Use saved tokens when setting local tokens on StorageService.joinRing()
[ https://issues.apache.org/jira/browse/CASSANDRA-12935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Shuler updated CASSANDRA-12935: --- Fix Version/s: (was: 3.11) 3.10 > Use saved tokens when setting local tokens on StorageService.joinRing() > --- > > Key: CASSANDRA-12935 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12935 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Paulo Motta >Assignee: Paulo Motta >Priority: Minor > Fix For: 2.2.9, 3.0.11, 3.10, 4.0 > > > The introduction of {{StorageService.finishJoiningRing()}} on CASSANDRA-8523: > {code:java} > @@ -885,17 +896,14 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > { > if (dataAvailable) > { > -// start participating in the ring. > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > -setTokens(bootstrapTokens); > +finishJoiningRing(); > + > // remove the existing info about the replaced node. > if (!current.isEmpty()) > { > for (InetAddress existing : current) > Gossiper.instance.replacedEndpoint(existing); > } > -assert tokenMetadata.sortedTokens().size() > 0; > -doAuthSetup(); > } > else > { > @@ -908,6 +916,11 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > else if (isSurveyMode) > { > -setTokens(SystemKeyspace.getSavedTokens()); > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > isSurveyMode = false; > logger.info("Leaving write survey mode and joining ring at > operator request"); > -assert tokenMetadata.sortedTokens().size() > 0; > - > -doAuthSetup(); > +finishJoiningRing(); > } > } > > +private void finishJoiningRing() > +{ > +// start participating in the ring. > + > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > +setTokens(bootstrapTokens); > + > +assert tokenMetadata.sortedTokens().size() > 0; > +doAuthSetup(); > +} > + > {code} > slightly changed the way tokens are set on {{StorageService.joinRing()}} when > {{cassandra.write_survey=true}} from > {{setTokens(SystemKeyspace.getSavedTokens())}} > to {{setTokens(bootstrapTokens)}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12935) Use saved tokens when setting local tokens on StorageService.joinRing()
[ https://issues.apache.org/jira/browse/CASSANDRA-12935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-12935: --- Resolution: Fixed Fix Version/s: 3.11 4.0 3.0.11 2.2.9 Status: Resolved (was: Patch Available) +1 Committed as [a449e8f|https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=commit;h=a449e8f70f047081b2fd5892219ad2659d0027bd] and merged forward. > Use saved tokens when setting local tokens on StorageService.joinRing() > --- > > Key: CASSANDRA-12935 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12935 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Paulo Motta >Assignee: Paulo Motta >Priority: Minor > Fix For: 2.2.9, 3.0.11, 4.0, 3.11 > > > The introduction of {{StorageService.finishJoiningRing()}} on CASSANDRA-8523: > {code:java} > @@ -885,17 +896,14 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > { > if (dataAvailable) > { > -// start participating in the ring. > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > -setTokens(bootstrapTokens); > +finishJoiningRing(); > + > // remove the existing info about the replaced node. > if (!current.isEmpty()) > { > for (InetAddress existing : current) > Gossiper.instance.replacedEndpoint(existing); > } > -assert tokenMetadata.sortedTokens().size() > 0; > -doAuthSetup(); > } > else > { > @@ -908,6 +916,11 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > else if (isSurveyMode) > { > -setTokens(SystemKeyspace.getSavedTokens()); > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > isSurveyMode = false; > logger.info("Leaving write survey mode and joining ring at > operator request"); > -assert tokenMetadata.sortedTokens().size() > 0; > - > -doAuthSetup(); > +finishJoiningRing(); > } > } > > +private void finishJoiningRing() > +{ > +// start participating in the ring. > + > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > +setTokens(bootstrapTokens); > + > +assert tokenMetadata.sortedTokens().size() > 0; > +doAuthSetup(); > +} > + > {code} > slightly changed the way tokens are set on {{StorageService.joinRing()}} when > {{cassandra.write_survey=true}} from > {{setTokens(SystemKeyspace.getSavedTokens())}} > to {{setTokens(bootstrapTokens)}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12935) Use saved tokens when setting local tokens on StorageService.joinRing()
[ https://issues.apache.org/jira/browse/CASSANDRA-12935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joshua McKenzie updated CASSANDRA-12935: Reviewer: Carl Yeksigian > Use saved tokens when setting local tokens on StorageService.joinRing() > --- > > Key: CASSANDRA-12935 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12935 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Paulo Motta >Assignee: Paulo Motta >Priority: Minor > > The introduction of {{StorageService.finishJoiningRing()}} on CASSANDRA-8523: > {code:java} > @@ -885,17 +896,14 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > { > if (dataAvailable) > { > -// start participating in the ring. > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > -setTokens(bootstrapTokens); > +finishJoiningRing(); > + > // remove the existing info about the replaced node. > if (!current.isEmpty()) > { > for (InetAddress existing : current) > Gossiper.instance.replacedEndpoint(existing); > } > -assert tokenMetadata.sortedTokens().size() > 0; > -doAuthSetup(); > } > else > { > @@ -908,6 +916,11 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > else if (isSurveyMode) > { > -setTokens(SystemKeyspace.getSavedTokens()); > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > isSurveyMode = false; > logger.info("Leaving write survey mode and joining ring at > operator request"); > -assert tokenMetadata.sortedTokens().size() > 0; > - > -doAuthSetup(); > +finishJoiningRing(); > } > } > > +private void finishJoiningRing() > +{ > +// start participating in the ring. > + > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > +setTokens(bootstrapTokens); > + > +assert tokenMetadata.sortedTokens().size() > 0; > +doAuthSetup(); > +} > + > {code} > slightly changed the way tokens are set on {{StorageService.joinRing()}} when > {{cassandra.write_survey=true}} from > {{setTokens(SystemKeyspace.getSavedTokens())}} > to {{setTokens(bootstrapTokens)}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12935) Use saved tokens when setting local tokens on StorageService.joinRing()
[ https://issues.apache.org/jira/browse/CASSANDRA-12935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paulo Motta updated CASSANDRA-12935: Status: Patch Available (was: Open) > Use saved tokens when setting local tokens on StorageService.joinRing() > --- > > Key: CASSANDRA-12935 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12935 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Paulo Motta >Assignee: Paulo Motta >Priority: Minor > > The introduction of {{StorageService.finishJoiningRing()}} on CASSANDRA-8523: > {code:java} > @@ -885,17 +896,14 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > { > if (dataAvailable) > { > -// start participating in the ring. > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > -setTokens(bootstrapTokens); > +finishJoiningRing(); > + > // remove the existing info about the replaced node. > if (!current.isEmpty()) > { > for (InetAddress existing : current) > Gossiper.instance.replacedEndpoint(existing); > } > -assert tokenMetadata.sortedTokens().size() > 0; > -doAuthSetup(); > } > else > { > @@ -908,6 +916,11 @@ public class StorageService extends > NotificationBroadcasterSupport implements IE > else if (isSurveyMode) > { > -setTokens(SystemKeyspace.getSavedTokens()); > - > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > isSurveyMode = false; > logger.info("Leaving write survey mode and joining ring at > operator request"); > -assert tokenMetadata.sortedTokens().size() > 0; > - > -doAuthSetup(); > +finishJoiningRing(); > } > } > > +private void finishJoiningRing() > +{ > +// start participating in the ring. > + > SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); > +setTokens(bootstrapTokens); > + > +assert tokenMetadata.sortedTokens().size() > 0; > +doAuthSetup(); > +} > + > {code} > slightly changed the way tokens are set on {{StorageService.joinRing()}} when > {{cassandra.write_survey=true}} from > {{setTokens(SystemKeyspace.getSavedTokens())}} > to {{setTokens(bootstrapTokens)}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)