bereng commented on a change in pull request #1221:
URL: https://github.com/apache/cassandra/pull/1221#discussion_r721975767
##########
File path: src/java/org/apache/cassandra/schema/SchemaKeyspace.java
##########
@@ -70,41 +72,14 @@ private SchemaKeyspace()
private static final boolean FLUSH_SCHEMA_TABLES =
Boolean.parseBoolean(System.getProperty("cassandra.test.flush_local_schema_changes",
"true"));
private static final boolean IGNORE_CORRUPTED_SCHEMA_TABLES =
Boolean.parseBoolean(System.getProperty("cassandra.ignore_corrupted_schema_tables",
"false"));
- public static final String KEYSPACES = "keyspaces";
- public static final String TABLES = "tables";
- public static final String COLUMNS = "columns";
- public static final String DROPPED_COLUMNS = "dropped_columns";
- public static final String TRIGGERS = "triggers";
- public static final String VIEWS = "views";
- public static final String TYPES = "types";
- public static final String FUNCTIONS = "functions";
- public static final String AGGREGATES = "aggregates";
- public static final String INDEXES = "indexes";
-
- /**
- * The order in this list matters.
- *
- * When flushing schema tables, we want to flush them in a way that
mitigates the effects of an abrupt shutdown whilst
- * the tables are being flushed. On startup, we load the schema from disk
before replaying the CL, so we need to
- * try to avoid problems like reading a table without columns or types,
for example. So columns and types should be
- * flushed before tables, which should be flushed before keyspaces.
- *
- * When truncating, the order should be reversed. For immutable lists this
is an efficient operation that simply
- * iterates in reverse order.
- *
- * See CASSANDRA-12213 for more details.
- */
- public static final ImmutableList<String> ALL =
- ImmutableList.of(COLUMNS, DROPPED_COLUMNS, TRIGGERS, TYPES, FUNCTIONS,
AGGREGATES, INDEXES, TABLES, VIEWS, KEYSPACES);
-
Review comment:
If you move the cts to the `SchemaKeyspace` class then you can't make
that class package private. Which imo is good at preventing anybody adding a
`public` method to `SchemaKeyspace`. That reinforces `Schema` to be the public
API as it's the public class.
But I don't have a strong opinion here. @smiklosovic since you dropped a
comment feel free to untie us lol! wdyt?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]