Github user trkurc commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/478#discussion_r65223758
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
 ---
    @@ -950,6 +955,45 @@ private void rollback(final boolean penalize, final 
boolean rollbackCheckpoint)
             resetState();
         }
     
    +    private String loggableFlowfileInfo() {
    +        final StringBuilder details = new StringBuilder(1024).append("[");
    +        final int initLen = details.length();
    +        int filesListed = 0;
    +        int maxRollbackFlowfilesToLog = 5;
    +        for (Map.Entry<FlowFileRecord, StandardRepositoryRecord> entry : 
records.entrySet()) {
    +            final FlowFileRecord entryKey = entry.getKey();
    +            final StandardRepositoryRecord entryValue = entry.getValue();
    +            if (details.length() > initLen) {
    +                details.append(", ");
    +            }
    +            if (entryValue.getOriginalQueue() != null && 
entryValue.getOriginalQueue().getIdentifier() != null) {
    +                details.append("queue=")
    +                        
.append(entryValue.getOriginalQueue().getIdentifier())
    +                        .append("/");
    +            }
    +            details.append("filename=")
    +                    
.append(entryKey.getAttribute(CoreAttributes.FILENAME.key()))
    +                    .append("/uuid=")
    +                    
.append(entryKey.getAttribute(CoreAttributes.UUID.key()));
    +            filesListed++;
    +            if (filesListed > maxRollbackFlowfilesToLog) {
    --- End diff --
    
    I think this check needs to be moved up (if someone changes 
maxRollbackFlowfilesToLog to 0 at some point in the future, this is too late), 
and I believe the intent was for the > to be a >=.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to