bereng commented on code in PR #3203:
URL: https://github.com/apache/cassandra/pull/3203#discussion_r1555397106
##########
src/java/org/apache/cassandra/hints/HintsStore.java:
##########
@@ -111,17 +117,37 @@ PendingHintsInfo getPendingHintsInfo()
int queueSize = 0;
long minTimestamp = Long.MAX_VALUE;
long maxTimestamp = Long.MIN_VALUE;
+ long totalSize = 0;
while (descriptors.hasNext())
{
HintsDescriptor descriptor = descriptors.next();
minTimestamp = Math.min(minTimestamp, descriptor.timestamp);
maxTimestamp = Math.max(maxTimestamp, descriptor.timestamp);
+ totalSize += descriptor.hintsFileSize(hintsDirectory);
queueSize++;
}
- if (queueSize == 0)
+ int corruptedFilesCount = 0;
+ long corruptedFilesSize = 0;
+
+ Iterator<HintsDescriptor> corruptedDescriptors =
corruptedFiles.iterator();
+ while (corruptedDescriptors.hasNext())
+ {
+ HintsDescriptor corruptedDescriptor = corruptedDescriptors.next();
+ try
+ {
+ corruptedFilesSize +=
corruptedDescriptor.hintsFileSize(hintsDirectory);
+ } catch (Exception ex)
+ {
+ // ignore
Review Comment:
Why not add that explanation to the java comment?
--
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]