Github user jskora commented on a diff in the pull request: https://github.com/apache/nifi/pull/430#discussion_r63279016 --- Diff: nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java --- @@ -109,6 +109,19 @@ void rollback(boolean penalize); /** + * Produces a listing of pertinent information about the session's + * unacknowledged flowfiles that can be used for logging purposes. If the + * session fails for any reason this can help identify problem files with + * minimal system impact. + * + * Because of testing dependencies and ot + * + * @return {@link String} listing pertinent information about the session's + * unacknowledged flowfiles, primarily intended for logging purposes. + */ + String getUnacknowledgedFlowfileInfo(); --- End diff -- The root problem is tracking "Administratively Yielding" messages back to a flow file, so it lists the unacknowledged flow files since committed and transferred files were already processed. Looking at where the "Administratively Yielding" messages come from in [EventDrivenSchedulingAgent](https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/EventDrivenSchedulingAgent.java#L337) and [ContinuallyRunProcessTask](https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ContinuallyRunProcessorTask.java#L167), the framework doesn't have visibility into the active processor that threw the uncaught exception. This implementation populates the log message without taxing the framework or requiring support in the processors, but it can still be overridden for customiza tion by individual processors. Providing flow files objects instead of a log message would expose internals between framework layers and complicate api and implementation module dependencies in the build. The upper level framework delegates flow file handling further down, so this approach similarly delegates the log message creation with minimal risk and impact on the framework.
--- 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. ---