markap14 commented on code in PR #10874:
URL: https://github.com/apache/nifi/pull/10874#discussion_r2933436997


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/WriteAheadFlowFileRepository.java:
##########
@@ -777,6 +828,18 @@ public long loadFlowFiles(final QueueProvider 
queueProvider) throws IOException
 
                 continue;
             } else if (claim != null) {
+                // If the claim exceeds the max appendable claim length on its 
own and doesn't start the Resource Claim,
+                // we will consider it to be eligible for truncation. However, 
if there are multiple FlowFiles sharing the
+                // same claim, we cannot truncate it because doing so would 
affect the other FlowFiles.
+                if (claim.getOffset() > 0 && claim.getLength() > 
truncationThreshold && claim instanceof final StandardContentClaim scc) {

Review Comment:
   It should never be anything other than `StandardContentClaim`. That that is 
purely "defensive" because we need to cast.



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

Reply via email to