henrikingo commented on code in PR #2284:
URL: https://github.com/apache/cassandra/pull/2284#discussion_r1174234458
##########
src/java/org/apache/cassandra/db/Directories.java:
##########
@@ -485,18 +485,39 @@ public boolean hasAvailableDiskSpace(long
estimatedSSTables, long expectedTotalW
{
long writeSize = expectedTotalWriteSize / estimatedSSTables;
long totalAvailable = 0L;
+ boolean hasSpace = true;
for (DataDirectory dataDir : paths)
{
if
(DisallowedDirectories.isUnwritable(getLocationForDisk(dataDir)))
continue;
DataDirectoryCandidate candidate = new
DataDirectoryCandidate(dataDir);
// exclude directory if its total writeSize does not fit to data
directory
+ logger.debug("DataDirectory {} has {} bytes available, checking if
we can write {} bytes", dataDir.location, candidate.availableSpace, writeSize);
Review Comment:
I was thinking about it when I worked on trunk. I think the message makes
sense as such: It records exactly the kind of environmental data you would use
for DEBUG purposes, but 99% of the time is uninteresting. The fact that the
result of the function can be determined from the message is actually a good
property. It just means a single DEBUG message has captured everything.
Now... I do agree the DEBUG message is perhaps unnecessary after the
addition of the WARN message.
The reason I didn't remove it was that it would have felt weird to remove
something that wasn't even released yet. But of course we can do it, it's a
poor reason.
But... Maybe ask the authors of the patch that added the debug message
@krummas and @jmckenzie-dev ?
--
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]