bdeggleston commented on code in PR #4396:
URL: https://github.com/apache/cassandra/pull/4396#discussion_r2384268172
##########
src/java/org/apache/cassandra/streaming/StreamPlan.java:
##########
@@ -254,4 +270,15 @@ public static boolean hasAccordTables(KeyspaceMetadata ksm)
{
return ksm.tables.stream().anyMatch(TableMetadata::isAccordEnabled);
}
+
+ /**
+ * Check if the given keyspace uses tracked replication, which requires
mutation log streaming.
+ *
+ * @param keyspace the keyspace name
+ * @return true if the keyspace uses tracked replication
+ */
+ private boolean isTrackedReplicationEnabled(String keyspace)
+ {
+ return
ClusterMetadata.current().schema.getKeyspaceMetadata(keyspace).useMutationTracking();
Review Comment:
StreamPlan assumes that you're only sending/requesting streams for keyspaces
that exist, and the rest of the class has the same null unsafety around
keyspace lookups. I can add a more descriptive error message if you like, but
if the keyspace doesn't exist, other parts of stream plan will have already
thrown an NPE before getting here
--
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]