You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/09/04 02:50:05 UTC

[GitHub] [cassandra] maedhroz commented on a change in pull request #733: CASSANDRA-15949 Add guardrails to the task that periodically recomputes the global speculative retry threshold.

maedhroz commented on a change in pull request #733:
URL: https://github.com/apache/cassandra/pull/733#discussion_r483355872



##########
File path: src/java/org/apache/cassandra/db/Keyspace.java
##########
@@ -337,7 +337,19 @@ private Keyspace(String keyspaceName, boolean loadSSTables)
         for (TableMetadata cfm : metadata.tablesAndViews())
         {
             logger.trace("Initializing {}.{}", getName(), cfm.name);
-            initCf(Schema.instance.getTableMetadataRef(cfm.id), loadSSTables);
+            TableMetadataRef tableMetadataRef = Schema.instance.getTableMetadataRef(cfm.id);
+            
+            if (tableMetadataRef == null)
+            {
+                logger.info("Failed to initialize {}.{}, as no table metadata was available. This " +
+                            "has likely occurred because the keyspace metadata for {} has not yet " +
+                            "been updated to reflect the table being dropped.", 
+                            getName(), cfm.name, getName());

Review comment:
       The one thing that did cross my mind is whether or not simply logging here wouldn't be loud enough in some case, but we're already supposed to have a `TableMetadata` instance. It's not like we'll just log at INFO if something higher up the stack passes a non-existent table name.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org