Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/421#discussion_r227422808
--- Diff: libminifi/include/capi/Plan.h ---
@@ -93,11 +95,50 @@ class ExecutionPlan {
next_ff_ = ptr;
}
+ static std::shared_ptr<core::Processor> createProcessor(const
std::string &processor_name, const std::string &name);
+
protected:
+ class FailureHandler {
+ public:
+ FailureHandler() {
+ callback_ = nullptr;
+ }
+ void setCallback(void (*onerror_callback)(const flow_file_record*)) {
+ callback_=onerror_callback;
+ }
+ void operator()(const processor_session* ps)
+ {
--- End diff --
These are features that exist within NiFi and are things users will
undoubtedly expect. Rollback is a feature that enables us to roll back that
flow file. As you state in the comment in capi.h it is the dev's responsibility
to copy the content -- but the content could be modified at this point and not
the original content -- that's something that should happen at rollback.
Therefore even left it at at this state, they are potentially losing any
ability to correct or even copy the data before a processor may have failed or
modified the content. Happy to move this to a ticket referencing this PR if you
want to create one, that way we can implement that discussion before release
and avoid keeping this PR alive forever. Also happy to keep discussion here,
too.
---