smiklosovic commented on code in PR #4458:
URL: https://github.com/apache/cassandra/pull/4458#discussion_r2490044105
##########
src/java/org/apache/cassandra/schema/SystemDistributedKeyspace.java:
##########
@@ -481,6 +509,38 @@ public static CompressionDictionary
retrieveCompressionDictionary(String keyspac
}
}
+ /**
+ * Retrieves all dictionaries for a given keyspace and table.
+ *
+ * @param keyspaceName the keyspace name to retrieve the dictionary for
+ * @param tableName the table name to retrieve the dictionary for
+ * @return the compression dictionaries identified by the specified
keyspace and table,
+ * or null if no dictionary exists or if an error occurs during
retrieval
+ */
+ @Nullable
Review Comment:
We can do that but how do we differentiate between genuinely empty list and
empty list as the result of some error? (as I assume we would return empty list
when we catch an exception).
If there is some bug in `CompressionDictionary.createFromRowLightweight`, or
in the processing logic as such, and we throw, then we will happily return
empty list and we will act as if nothing happened.
I would at least log in catch before returning empty list, same when
returning null from other methods so we have at least some chance to see what
went wrong.
--
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]