Maxwell-Guo commented on code in PR #2321:
URL: https://github.com/apache/cassandra/pull/2321#discussion_r1204965755


##########
conf/cassandra.yaml:
##########
@@ -1541,7 +1541,8 @@ batch_size_fail_threshold: 50KiB
 # Log WARN on any batches not of type LOGGED than span across more partitions 
than this limit
 unlogged_batch_across_partitions_warn_threshold: 10
 
-# Log a warning when compacting partitions larger than this value
+# Log a warning when compacting partitions larger than this value.
+# As of Cassandra 5.0, this property is deprecated in favour of 
partition_size_warn_threshold.

Review Comment:
   ok



##########
src/java/org/apache/cassandra/io/sstable/format/SortedTableWriter.java:
##########
@@ -324,6 +325,19 @@ protected FileHandle openDataFile(long lengthOverride, 
StatsMetadata statsMetada
         return dataFile;
     }
 
+    private void guardPartitionSize(DecoratedKey key, long rowSize)
+    {
+        if (Guardrails.partitionSize.triggersOn(rowSize, null))
+        {
+            String what = String.format("%s.%s:%s on sstable %s",

Review Comment:
   yes ,I found C* use String.format almost everywhere. So I said this comment 
can be ignored. 



##########
conf/cassandra.yaml:
##########
@@ -1804,6 +1805,15 @@ drop_compact_storage_enabled: false
 # write_consistency_levels_warned: []
 # write_consistency_levels_disallowed: []
 #
+# Guardrail to warn or fail when writing partitions larger than threshold.
+# The guardrail is only checked when writing sstables (flush, compaction, 
streaming, etc.), and exceeding the fail
+# threshold on that moment will only log an error message, without 
interrupting the operation.
+# This operates on a per-sstable basis, so it won't detect a large partition 
if it is spread across multiple sstables.
+# The warning threshold replaces the deprecated config property 
compaction_large_partition_warning_threshold.
+# The two thresholds default to null to disable.

Review Comment:
   These sstables that are going to stream to other nodes are generated by 
flush or compaction , and we may just need to use the guardrail to detecte at 
flush or compaction stage. 
   
   The reveiver  or the sending node do not need to use the guardrail to 
detecte at stream stage. 
   
   That is what I mean. 



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

Reply via email to