You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "Maxwell-Guo (via GitHub)" <gi...@apache.org> on 2023/04/21 02:15:34 UTC

[GitHub] [cassandra] Maxwell-Guo commented on a diff in pull request #2244: CASSANDRA-18260 Add details to Error: Not enough space for compaction

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


##########
src/java/org/apache/cassandra/db/Directories.java:
##########
@@ -544,14 +544,21 @@ public static boolean hasDiskSpaceForCompactionsAndStreams(Map<File, Long> expec
      */
     public static boolean hasDiskSpaceForCompactionsAndStreams(Map<FileStore, Long> totalToWrite)
     {
+        boolean hasSpace = true;
         for (Map.Entry<FileStore, Long> toWrite : totalToWrite.entrySet())
         {
             long availableForCompaction = getAvailableSpaceForCompactions(toWrite.getKey());
             logger.debug("FileStore {} has {} bytes available, checking if we can write {} bytes", toWrite.getKey(), availableForCompaction, toWrite.getValue());

Review Comment:
   as [the comment here](https://github.com/apache/cassandra/pull/2284#pullrequestreview-1393420403)
   I think we can also remove this message .



##########
test/unit/org/apache/cassandra/db/DirectoriesTest.java:
##########
@@ -105,12 +117,20 @@
     public static final String SNAPSHOT3 = "snapshot3";
 
     public static final String LEGACY_SNAPSHOT_NAME = "42";
+
+
     private static File tempDataDir;
     private static final String KS = "ks";
     private static String[] TABLES;
     private static Set<TableMetadata> CFM;
     private static Map<String, List<File>> sstablesByTableName;
 
+    private static final String MDCID = "test-DirectoriesTest-id";
+    private static AtomicInteger diyThreadId = new AtomicInteger(1);
+    private int myDiyId=-1;

Review Comment:
   code format : myDiyId = -1;



-- 
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: pr-unsubscribe@cassandra.apache.org

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