[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17426843#comment-17426843 ] Aleksei Zotov commented on CASSANDRA-14557: --- [~sumanth.pasupuleti] Thanks for the incorporating my feedback! There are two more very minor nits that can be fixed on commit though (as well as _CHANGES.txt_). So the code LGTM. I started CI: [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1204/,] let wait for the results. [~stefan.miklosovic] [~brandon.williams] would you be able to review the PR? > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17426824#comment-17426824 ] Sumanth Pasupuleti commented on CASSANDRA-14557: [~azotcsit] Thanks for the further feedback. Incorporated the recommended changes. Please let me know if you have further feedback. I plan to squash the changes once we are happy with the code. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17421065#comment-17421065 ] Aleksei Zotov commented on CASSANDRA-14557: --- [~sumanth.pasupuleti] Thanks for incorporating the feedback! I raised a PR for your branch, it is just easier for me to review since I can mark some file viewed and do not double check them (every time I check the code I see smth to carp :D). I put a few minor comments, please, take a look and let me know if they make sense to you. https://github.com/apache/cassandra/pull/1229 > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17420273#comment-17420273 ] Sumanth Pasupuleti commented on CASSANDRA-14557: [~azotcsit] [~stefan.miklosovic] Thanks for further feedback. Incorporated the feedback. https://github.com/sumanth-pasupuleti/cassandra/tree/14557-trunk > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416166#comment-17416166 ] Sumanth Pasupuleti commented on CASSANDRA-14557: [~stefan.miklosovic] Sorry for the temporary stall. Got pre-empted by a couple of higher priority tasks. I am hoping to move this forward within a week or so. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416086#comment-17416086 ] Stefan Miklosovic commented on CASSANDRA-14557: --- Hi [~sumanth.pasupuleti], do you plan to move this forward in the forseeable future? > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17407290#comment-17407290 ] Aleksei Zotov commented on CASSANDRA-14557: --- [~sumanth.pasupuleti] Thank you! I'm sorry for being scrupulous, but I put a few more comments to [https://github.com/sumanth-pasupuleti/cassandra/commit/5deffedf07186f0af5f5dcf7436bc3a459ed6b42]. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17406552#comment-17406552 ] Sumanth Pasupuleti commented on CASSANDRA-14557: [~azotcsit] Thank you, responded to your comments and incorporated the feedback. https://github.com/sumanth-pasupuleti/cassandra/tree/14557-trunk > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17404742#comment-17404742 ] Aleksei Zotov commented on CASSANDRA-14557: --- Thanks [~sumanth.pasupuleti]! I replied to your comments at the same same commit: [https://github.com/sumanth-pasupuleti/cassandra/commit/139a01531f1b51f6b3b7dc005a7df929ec9409a5]. Please, take a look and let me know your thoughts. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17404307#comment-17404307 ] Sumanth Pasupuleti commented on CASSANDRA-14557: [~azotcsit] latest branch https://github.com/sumanth-pasupuleti/cassandra/tree/14557-trunk reflects the changes from your latest round of review, and you can find responses to your comments at https://github.com/sumanth-pasupuleti/cassandra/commit/139a01531f1b51f6b3b7dc005a7df929ec9409a5. [~stefan.miklosovic] Good call out on CASSANDRA-16203. This does fit philosophically and logically, however, fromMapWithDefaults will have to accommodate to this new class. Will add a comment to CASSANDRA-16203 if this gets committed before CASSANDRA-16203. Also, added nodetool commands to override default rf and minimum rf. This is still cumbersome to do it for each node, but yes it serves the purpose of avoiding node restart. We may ideally want to put an endpoint in the [sidecar|https://github.com/apache/cassandra-sidecar], that could potentially change these configurations across the cluster. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17400842#comment-17400842 ] Stefan Miklosovic commented on CASSANDRA-14557: --- That is true but it is still better than restarting them all :) > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17400359#comment-17400359 ] Brandon Williams commented on CASSANDRA-14557: -- bq. inability to change it without restarting a node seems to be quite much to demand. JMX will allow it to be changed, but I think having to poke every node is also going to be cumbersome and error prone. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17400202#comment-17400202 ] Stefan Miklosovic commented on CASSANDRA-14557: --- By the way, I would like to see also a way how to change this in runtime via JMX. It seems to me rather strict to enable this once in cassandra.yaml and then it is set in stone since then ... Requirements changes over time in this regard and inability to change it without restarting a node seems to be quite much to demand. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17400192#comment-17400192 ] Stefan Miklosovic commented on CASSANDRA-14557: --- Would this change be compatible (philosophically and logically) with https://issues.apache.org/jira/browse/CASSANDRA-16203 ? Just asking as it is somehow related, I am not sure about the details so I am sorry in advance if I ask unnecesarilly. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17398309#comment-17398309 ] Aleksei Zotov commented on CASSANDRA-14557: --- [~sumanth.pasupuleti] Thanks for the addressing the comments! I made one more review round and dug into replication strategies a bit deeper. I feel there is a potential problem with the current implementation for NTS (particularly in setting "replication_strategy" parameter). Also I feel there is a better place for the tricky logic you wrote for setting the default RF. I posted corresponding comments to the PR. Please, take a look and let me know your thoughts. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17397530#comment-17397530 ] Sumanth Pasupuleti commented on CASSANDRA-14557: [~azotcsit] Thanks for the review. I put my responses to the comments and incorporated some of the feedback and updated the branch https://github.com/sumanth-pasupuleti/cassandra/tree/14557-trunk > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17378760#comment-17378760 ] Aleksei Zotov commented on CASSANDRA-14557: --- [~sumanth.pasupuleti] I put a couple of comments to [https://github.com/sumanth-pasupuleti/cassandra/commit/f9fb9537e2c6a41b3df13c7c4af2d23b0912b18c]. Could you please check once you have some time. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17110462#comment-17110462 ] Sumanth Pasupuleti commented on CASSANDRA-14557: Based on the suggestion in the dev list, I've updated the patch to include a note about impact on system keyspaces in cassandra.yaml. Updated github branch: https://github.com/sumanth-pasupuleti/cassandra/tree/14557-trunk Updated patch file: [^14557-4.0.txt] > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-4.0.txt, 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17109200#comment-17109200 ] Sumanth Pasupuleti commented on CASSANDRA-14557: I verified the dtest failures by rebasing on latest trunk, and comparing with trunk's dtests. There does not seem to be a regression. Rebased branch: https://github.com/sumanth-pasupuleti/cassandra/commits/14557-trunk 14557 CI results https://circleci.com/workflow-run/65da2983-4808-4dd5-9248-649bf5fa74a2 https://circleci.com/workflow-run/4f757ad5-93a9-4178-8cc6-cc3999701ee7 Trunk CI results https://circleci.com/workflow-run/5f2381af-981c-49fc-8bc4-dd519f020118 https://circleci.com/workflow-run/030d18b9-4dda-480b-9b15-a2e012747aca > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17106136#comment-17106136 ] Alex Petrov commented on CASSANDRA-14557: - bq. do you suggest starting a new thread in dev list / slack? I'd say dev list is the best way! Btw, not saying that the change is bad, since most people actually do increase RF of system keyspaces as one of the first things they do on their clusters. It's just that such change deserves its own ticket and accompanying discussion, even if it ends up being +1 from everyone. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17106066#comment-17106066 ] Sumanth Pasupuleti commented on CASSANDRA-14557: Thanks for the rebase and kicking off CI runs. I agree, it may be non-intuitive that this feature also applies to system keyspaces, and not just user keyspaces. Infact, one of the primary reasons why I felt this feature to be useful is to make sure system_auth keyspace comes up with an RF of 3, vs the default 1. As for the discussion, do you suggest starting a new thread in dev list / slack? Will take a look at the dtests and update the ticket. Also, I've noted that, its best to change the state to "ready to commit" after the ticket is reviewed, thanks for the suggestion. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105521#comment-17105521 ] Alex Petrov commented on CASSANDRA-14557: - Wanted to commit this since it looked like this is a complete patch, so rebased and triggered a CI. I have two comments: * I'm not sure if changing replication factor of system keyspaces is expected by anyone who sees this feature. Maybe we should have a discussion about this before the change. * There's a dtest failure that looks related, please check it out before we proceed with committing: https://circleci.com/gh/ifesdjeen/cassandra/2122#tests/containers/13 more failures here: https://circleci.com/gh/ifesdjeen/cassandra/2123#tests/containers/32 Rebased branch: https://github.com/ifesdjeen/cassandra/tree/14557-trunk All CI results: https://circleci.com/gh/ifesdjeen/cassandra/tree/14557-trunk In general, I suggest putting ticket into "ready to commit" state so that committers could pick notice it, or ping some committer directly. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Local/Config >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Low > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16728811#comment-16728811 ] Sumanth Pasupuleti commented on CASSANDRA-14557: Rebased on latest trunk and added more tests. Patch: [^14557-trunk.patch] [Passing UTs|https://circleci.com/gh/sumanth-pasupuleti/cassandra/203] [Github branch|https://github.com/sumanth-pasupuleti/cassandra/tree/CASSANDRA-14557-2] > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.x > > Attachments: 14557-trunk.patch > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572332#comment-16572332 ] Jaydeepkumar Chovatia commented on CASSANDRA-14557: --- LGTM > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572163#comment-16572163 ] Sumanth Pasupuleti commented on CASSANDRA-14557: Thanks for reviewing [~chovatia.jayd...@gmail.com] {quote}Don't we have to apply minimum keyspace RF check for system keyspaces?{quote} System keyspace creation *does* go through the minimum keyspace rf check. So, if someone configures default_keyspace_rf = 1 and minimum_keyspace_rf=2, Cassandra fails to start, since system keyspace creation fails because of the check. {quote}Think about renaming parsedRf to something more meaningful maybe userSuppliedRF:{quote} It could be both a user/system passed rf. Method parameter name has not been refactored (rf) as part of this ticket. Named this as parsedRf because we are parsing rf to int, and we wanted to avoid having to parse to int multiple times in the code. {quote} Have a consistent way of formatting string in Exception message{quote} Fixed; pushed a commit [7ee2827a3fd6a8f1550d9c0eec8f039b6ad6c74c|https://github.com/sumanth-pasupuleti/cassandra/commit/7ee2827a3fd6a8f1550d9c0eec8f039b6ad6c74c] > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16569619#comment-16569619 ] Jaydeepkumar Chovatia commented on CASSANDRA-14557: --- Please find my comments here: 1. {code:java} KeyspaceParams.simple(Math.max(1, DatabaseDescriptor.getDefaultKeyspaceRF())), {code} Don't we have to apply minimum keyspace RF check for system keyspaces? 2. Think about renaming {{parsedRf}} to something more meaningful maybe {{userSuppliedRF}}: {code:java} Integer parsedRf = Integer.parseInt(rf);{code} 3. Have a consistent way of formatting string in Exception message: {code:java} throw new ConfigurationException("Replication factor must be non-negative; found " + rf);}} throw new ConfigurationException(String.format("Replication factor %s cannot be less than minimum_keyspace_rf (%d)", rf, DatabaseDescriptor.getMinimumKeyspaceRF())); {code} Jaydeep > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16553108#comment-16553108 ] Joseph Lynch commented on CASSANDRA-14557: -- [~KurtG] I believe the current state of the patch is to provide the options and implement {{SimpleStrategy}}. We need CASSANDRA-14303 I believe to add support for {{NetworkTopologyStrategy}}. I think for CASSANDRA-14303 the default would only apply only if no datacenters were given in the declaration at all, e.g. {{{'class': 'NetworkTopologyStrategy'}}} would be equivalent to {{{'class': 'NetworkTopologyStrategy', 'default_datacenter_replication': 3}}}. The adding a datacenter flow is covered in CASSANDRA-14303 but briefly it relies on the autoexpansion only to happen at {{CREATE}} or {{ALTER}} time. If you don't supply {{default_datacenter_replication}} but do supply explicit datacenters everything works the same as in the past, if you do supply it then any datacenters that exist but are not specified in the {{CREATE/ALTER}} statement get that default value added. The minimum validation catches e.g. {{{'class': 'NetworkTopologyStrategy', 'default_datacenter_replication': 1}}} Removing a datacenter is slightly trickier because of the minimum rf validation (to remove a datacenter in the presence of {{default_datacenter_replication}} you have to provide an excluded datacenter with RF=0), but I think it will still work because the validation happens after we template out the replication map. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16552725#comment-16552725 ] Kurt Greaves commented on CASSANDRA-14557: -- How does this work when adding a new DC? Will it be the default RF in each DC? > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16551455#comment-16551455 ] Sumanth Pasupuleti commented on CASSANDRA-14557: Thanks for reviewing [~jolynch]. * Updated the patch with feedback incorporated * ccm runs are good * Added a mention about this ticket to [CASSANDRA-13701|https://issues.apache.org/jira/browse/CASSANDRA-13701] > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Labels: 4.0-feature-freeze-review-requested > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16551196#comment-16551196 ] Joseph Lynch commented on CASSANDRA-14557: -- [~sumanth.pasupuleti] this looks pretty good to me, this will be super helpful for users. Comments on the patch: * Consider making it clearer in the {{default_keyspace_rf}} cassandra.yaml comments that users probably want 3 in production not 1 (also probably same for minimum) * Probably need some docs updates in {{doc/source/cql/ddl.rst}} * Unit tests look good to me, have you done any ccm testing just to double check the full e2e flow though? I think a dtest is probably overkill for such a minor change but a few runs of ccm is probably worth it. * Can we leave a breadcrumb on CASSANDRA-13701 that it could use this option? * Can you run the unit tests and link the results here and when a committer looks let's run dtests? * Nitpick: You have some non style conforming comments in the tests (no space between // and comment) I think that the minimum validation still works with CASSANDRA-14303's strategy for removing keyspaces where it uses zero since that removal happens before the validation I believe. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16551192#comment-16551192 ] Sumanth Pasupuleti commented on CASSANDRA-14557: ||trunk|| | patch [^14557-trunk.txt] | |[github|https://github.com/sumanth-pasupuleti/cassandra/tree/CASSANDRA-14557]| |[unit tests|https://circleci.com/gh/sumanth-pasupuleti/cassandra/tree/CASSANDRA-14557]| > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Fix For: 4.0 > > Attachments: 14557-trunk.txt > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16542243#comment-16542243 ] Jaydeepkumar Chovatia commented on CASSANDRA-14557: --- [~sumanth.pasupuleti] I think this is a good idea to avoid RF=1. Looking forward for patch on this. > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Fix For: 4.0 > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16537280#comment-16537280 ] Joseph Lynch commented on CASSANDRA-14557: -- I think this is a great idea to help new users not shoot themselves in the foot (RF=1 keyspaces are simply a bad idea). [~sumanth.pasupuleti] if this get's merged let me know and I can rebase my patch in CASSANDRA-14303 to use this setting as the default if no default is given. I really look forward as a user to being able to do the following and Cassandra just doing the right thing by default: {noformat} CREATE KEYSPACE foo WITH replication = {'class': 'NetworkTopologyStrategy'} {noformat} > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Fix For: 4.0 > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token [allocation > algorithm|https://issues.apache.org/jira/browse/CASSANDRA-13701?focusedCommentId=16095662=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16095662] > interface more intuitive allowing easy use of the new token allocation > algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16533908#comment-16533908 ] Sumanth Pasupuleti commented on CASSANDRA-14557: [~jeromatron] yes it goes beyond, in the sense. * CASSANDRA-14303 focuses on not having to mention all the required datacenters during keyspace creation, rather leaving it to C* to figure out the data centers, while this ticket focuses on replication factor * default_keyspace_rf can work complementary to CASSANDRA-14303 in the sense, if user does not specify replication_factor during keyspace creation, default_keyspace_rf could be used. * default_keyspace_rf would be applicable for C* system keyspace creations (like system_auth) in addition to user created keyspaces * required_minimum_keyspace_rf is a configuration that will prevent any keyspace creations with an rf lower than what is configured > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Fix For: 4.0 > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token allocation algorithm interface more intuitive > allowing easy use of the new token allocation algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14557) Consider adding default and required keyspace replication options
[ https://issues.apache.org/jira/browse/CASSANDRA-14557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16533856#comment-16533856 ] Jeremy Hanna commented on CASSANDRA-14557: -- Does this go beyond CASSANDRA-14303? > Consider adding default and required keyspace replication options > - > > Key: CASSANDRA-14557 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14557 > Project: Cassandra > Issue Type: Improvement > Components: Configuration >Reporter: Sumanth Pasupuleti >Assignee: Sumanth Pasupuleti >Priority: Minor > Fix For: 4.0 > > > Ending up with a keyspace of RF=1 is unfortunately pretty easy in C* right > now - the system_auth table for example is created with RF=1 (to take into > account single node setups afaict from CASSANDRA-5112), and a user can > further create a keyspace with RF=1 posing availability and streaming risks > (e.g. rebuild). > I propose we add two configuration options in cassandra.yaml: > # {{default_keyspace_rf}} (default: 1) - If replication factors are not > specified, use this number. > # {{required_minimum_keyspace_rf}} (default: unset) - Prevent users from > creating a keyspace with an RF less than what is configured > These settings could further be re-used to: > * Provide defaults for new keyspaces created with SimpleStrategy or > NetworkTopologyStrategy (CASSANDRA-14303) > * Make the automatic token allocation algorithm interface more intuitive > allowing easy use of the new token allocation algorithm. > At the end of the day, if someone really wants to allow RF=1, they simply > don’t set the setting. For backwards compatibility the default remains 1 and > C* would create with RF=1, and would default to current behavior of allowing > any RF on keyspaces. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org