You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "lordgamez (via GitHub)" <gi...@apache.org> on 2023/07/26 15:27:31 UTC
[GitHub] [nifi-minifi-cpp] lordgamez opened a new pull request, #1616: MINIFICPP-2173 Fix MergeContent error handling issues
lordgamez opened a new pull request, #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616
- Remove intermediate individual `ProcessSession` for every processed bin
- Rollback flow files of a merge if the merge fails with an exception and put them back to the ready bins
- Remove `merge_flow` from session in case the merge fails to avoid throwing an exception for not finding the transfer relationship
- Do not yield and continue processing of the bins in case putting one of the flow files in a bin fails
- Log stream size and offset values in case of a `StreamSlice` creation failure
- Remove unused function parameters and use references instead of raw pointers
https://issues.apache.org/jira/browse/MINIFICPP-2173
-------------------
Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file?
- [ ] If applicable, have you updated the NOTICE file?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "szaszm (via GitHub)" <gi...@apache.org>.
szaszm commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1301159614
##########
extensions/libarchive/BinFiles.cpp:
##########
@@ -203,93 +208,97 @@ bool BinManager::offer(const std::string &group, const std::shared_ptr<core::Flo
return true;
}
-void BinFiles::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) {
- // Rollback is not viable for this processor!!
- {
- // process resurrected FlowFiles first
- auto flowFiles = file_store_.getNewFlowFiles();
- // these are already processed FlowFiles, that we own
- bool hadFailure = false;
- for (auto &file : flowFiles) {
- std::string groupId = getGroupId(context.get(), file);
- bool offer = this->binManager_.offer(groupId, file);
- if (!offer) {
- session->transfer(file, Failure);
- hadFailure = true;
- } else {
- // no need to route successfully captured such files as we already own them
- }
- }
- if (hadFailure) {
- context->yield();
- return;
+bool BinFiles::resurrectFlowFiles(core::ProcessSession &session) {
+ auto flow_files = file_store_.getNewFlowFiles();
+ // these are already processed FlowFiles, that we own
+ bool had_failure = false;
+ for (auto &file : flow_files) {
+ std::string group_id = getGroupId(file);
+ if (!binManager_.offer(group_id, file)) {
+ session.transfer(file, Failure);
+ had_failure = true;
}
+ // no need to route successfully captured such files as we already own them in the Self relationship
}
+ return had_failure;
+}
+void BinFiles::assumeOwnerShipOfNextBatch(core::ProcessSession &session) {
Review Comment:
A bit of a nitpick, but ownership is one word, so the "s" shouldn't be capital in camelCase.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1282896155
##########
extensions/libarchive/BinFiles.h:
##########
@@ -284,19 +285,24 @@ class BinFiles : public core::Processor {
protected:
// Allows general pre-processing of a flow file before it is offered to a bin. This is called before getGroupId().
- virtual void preprocessFlowFile(core::ProcessContext *context, core::ProcessSession *session, const std::shared_ptr<core::FlowFile>& flow);
+ virtual void preprocessFlowFile(const std::shared_ptr<core::FlowFile>& flow);
// Returns a group ID representing a bin. This allows flow files to be binned into like groups
- virtual std::string getGroupId(core::ProcessContext* /*context*/, const std::shared_ptr<core::FlowFile>& /*flow*/) {
+ virtual std::string getGroupId(const std::shared_ptr<core::FlowFile>& /*flow*/) {
return "";
}
// Processes a single bin.
- virtual bool processBin(core::ProcessContext* /*context*/, core::ProcessSession* /*session*/, std::unique_ptr<Bin>& /*bin*/) {
+ virtual bool processBin(core::ProcessSession& /*session*/, std::unique_ptr<Bin>& /*bin*/) {
return false;
}
// transfer flows to failure in bin
- static void transferFlowsToFail(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void transferFlowsToFail(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
// moves owned flows to session
- static void addFlowsToSession(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void addFlowsToSession(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
+
+ bool resurrectFlowFiles(core::ProcessSession &session);
+ void assumeOwnerShipOfNextBatch(core::ProcessSession &session);
+ std::deque<std::unique_ptr<Bin>> gatherReadyBins(core::ProcessContext &context);
+ void processReadyBins(std::deque<std::unique_ptr<Bin>> ready_bins, core::ProcessSession &session);
Review Comment:
Sorry, I misunderstood, I thought the comments were only needed for review purposes. I added and cleaned up some comments in fc0467b393bfec1f6a23dbf78aa1ced9ec96f684
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] martinzink commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "martinzink (via GitHub)" <gi...@apache.org>.
martinzink commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1275854796
##########
libminifi/src/core/ProcessSession.cpp:
##########
@@ -1147,4 +1147,8 @@ bool ProcessSession::existsFlowFileInRelationship(const Relationship &relationsh
});
}
+bool ProcessSession::hasBeenTransferred(const core::FlowFile &flow) const {
+ return updated_relationships_.contains(flow.getUUID()) || added_flowfiles_.contains(flow.getUUID());
Review Comment:
Shouldnt we also check if the relationship at the flow uuid is not nullptr?
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] martinzink commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "martinzink (via GitHub)" <gi...@apache.org>.
martinzink commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1275429341
##########
libminifi/src/io/StreamSlice.cpp:
##########
@@ -23,7 +23,8 @@ namespace org::apache::nifi::minifi::io {
StreamSlice::StreamSlice(std::shared_ptr<io::InputStream> stream, size_t offset, size_t size) : stream_(std::move(stream)), slice_offset_(offset), slice_size_(size) {
stream_->seek(slice_offset_);
if (stream_->size() < slice_offset_ + slice_size_)
- throw std::invalid_argument("StreamSlice is bigger than the Stream");
+ throw std::invalid_argument("StreamSlice is bigger than the Stream, Stream size: " + std::to_string(stream_->size()) +
+ ", StreamSlice size: " + std::to_string(slice_size_) + ", offset: " + std::to_string(slice_offset_));
Review Comment:
nitpicking but we could utilize fmt::format for a more compact and more readable version
```suggestion
throw std::invalid_argument(fmt::format("StreamSlice is bigger than the Stream, Stream size: {}, StreamSlice size: {}, offset: {}", stream_->size(), slice_size_, slice_offset_));
```
##########
extensions/libarchive/MergeContent.cpp:
##########
@@ -213,18 +213,19 @@ bool MergeContent::processBin(core::ProcessContext *context, core::ProcessSessio
});
}
- std::shared_ptr<core::FlowFile> merge_flow = std::static_pointer_cast<FlowFileRecord>(session->create());
+ std::shared_ptr<core::FlowFile> merge_flow = std::static_pointer_cast<FlowFileRecord>(session.create());
Review Comment:
I think it might be better to introduce a function to processSession that checks if the flowfile is in a valid transferred state, and then let a RAII take care of the removal instead. This way we dont have to keep in mind that we have to remove it during the various early return paths.
something like this should do it
```
auto remove_merge_flow = gsl::finally([&](){
if (!session.hasBeenTransferred(*merge_flow))
session.remove(merge_flow);
});
```
whre the hasbeentransferred should check if the updated_relationships_ or added_flowfiles_ maps contain a nonnull relationship* for the flowfile
##########
extensions/libarchive/MergeContent.cpp:
##########
@@ -246,27 +247,30 @@ bool MergeContent::processBin(core::ProcessContext *context, core::ProcessSessio
mimeType = "application/zip";
} else {
logger_->log_error("Merge format not supported %s", mergeFormat_);
+ session.remove(merge_flow);
return false;
}
std::shared_ptr<core::FlowFile> mergeFlow;
Review Comment:
nitpicking and old code, but this seems unused
```suggestion
```
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1301235162
##########
extensions/libarchive/BinFiles.cpp:
##########
@@ -203,93 +208,97 @@ bool BinManager::offer(const std::string &group, const std::shared_ptr<core::Flo
return true;
}
-void BinFiles::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) {
- // Rollback is not viable for this processor!!
- {
- // process resurrected FlowFiles first
- auto flowFiles = file_store_.getNewFlowFiles();
- // these are already processed FlowFiles, that we own
- bool hadFailure = false;
- for (auto &file : flowFiles) {
- std::string groupId = getGroupId(context.get(), file);
- bool offer = this->binManager_.offer(groupId, file);
- if (!offer) {
- session->transfer(file, Failure);
- hadFailure = true;
- } else {
- // no need to route successfully captured such files as we already own them
- }
- }
- if (hadFailure) {
- context->yield();
- return;
+bool BinFiles::resurrectFlowFiles(core::ProcessSession &session) {
+ auto flow_files = file_store_.getNewFlowFiles();
+ // these are already processed FlowFiles, that we own
+ bool had_failure = false;
+ for (auto &file : flow_files) {
+ std::string group_id = getGroupId(file);
+ if (!binManager_.offer(group_id, file)) {
+ session.transfer(file, Failure);
+ had_failure = true;
}
+ // no need to route successfully captured such files as we already own them in the Self relationship
}
+ return had_failure;
+}
+void BinFiles::assumeOwnerShipOfNextBatch(core::ProcessSession &session) {
Review Comment:
Updated in 124c1034ff66b2b2a839165a272c760e89b9ab5f
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1275933970
##########
libminifi/src/core/ProcessSession.cpp:
##########
@@ -1147,4 +1147,8 @@ bool ProcessSession::existsFlowFileInRelationship(const Relationship &relationsh
});
}
+bool ProcessSession::hasBeenTransferred(const core::FlowFile &flow) const {
+ return updated_relationships_.contains(flow.getUUID()) || added_flowfiles_.contains(flow.getUUID());
Review Comment:
Good catch, in `updated_relationships_` it didn't seem necessary as only passed references were stored in hat map, but in `added_flowfiles_` there is a separate state member for the relationship. Updated in 36eab99d6d2f0f9dcfedc0fcfee00ce1c1c414e4
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1280416004
##########
extensions/libarchive/BinFiles.h:
##########
@@ -284,19 +285,24 @@ class BinFiles : public core::Processor {
protected:
// Allows general pre-processing of a flow file before it is offered to a bin. This is called before getGroupId().
- virtual void preprocessFlowFile(core::ProcessContext *context, core::ProcessSession *session, const std::shared_ptr<core::FlowFile>& flow);
+ virtual void preprocessFlowFile(const std::shared_ptr<core::FlowFile>& flow);
// Returns a group ID representing a bin. This allows flow files to be binned into like groups
- virtual std::string getGroupId(core::ProcessContext* /*context*/, const std::shared_ptr<core::FlowFile>& /*flow*/) {
+ virtual std::string getGroupId(const std::shared_ptr<core::FlowFile>& /*flow*/) {
return "";
}
// Processes a single bin.
- virtual bool processBin(core::ProcessContext* /*context*/, core::ProcessSession* /*session*/, std::unique_ptr<Bin>& /*bin*/) {
+ virtual bool processBin(core::ProcessSession& /*session*/, std::unique_ptr<Bin>& /*bin*/) {
return false;
}
// transfer flows to failure in bin
- static void transferFlowsToFail(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void transferFlowsToFail(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
// moves owned flows to session
- static void addFlowsToSession(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void addFlowsToSession(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
+
+ bool resurrectFlowFiles(core::ProcessSession &session);
+ void assumeOwnerShipOfNextBatch(core::ProcessSession &session);
+ std::deque<std::unique_ptr<Bin>> gatherReadyBins(core::ProcessContext &context);
+ void processReadyBins(std::deque<std::unique_ptr<Bin>> ready_bins, core::ProcessSession &session);
Review Comment:
Added comment
##########
extensions/libarchive/BinFiles.h:
##########
@@ -284,19 +285,24 @@ class BinFiles : public core::Processor {
protected:
// Allows general pre-processing of a flow file before it is offered to a bin. This is called before getGroupId().
- virtual void preprocessFlowFile(core::ProcessContext *context, core::ProcessSession *session, const std::shared_ptr<core::FlowFile>& flow);
+ virtual void preprocessFlowFile(const std::shared_ptr<core::FlowFile>& flow);
// Returns a group ID representing a bin. This allows flow files to be binned into like groups
- virtual std::string getGroupId(core::ProcessContext* /*context*/, const std::shared_ptr<core::FlowFile>& /*flow*/) {
+ virtual std::string getGroupId(const std::shared_ptr<core::FlowFile>& /*flow*/) {
return "";
}
// Processes a single bin.
- virtual bool processBin(core::ProcessContext* /*context*/, core::ProcessSession* /*session*/, std::unique_ptr<Bin>& /*bin*/) {
+ virtual bool processBin(core::ProcessSession& /*session*/, std::unique_ptr<Bin>& /*bin*/) {
return false;
}
// transfer flows to failure in bin
- static void transferFlowsToFail(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void transferFlowsToFail(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
// moves owned flows to session
- static void addFlowsToSession(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void addFlowsToSession(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
+
+ bool resurrectFlowFiles(core::ProcessSession &session);
+ void assumeOwnerShipOfNextBatch(core::ProcessSession &session);
+ std::deque<std::unique_ptr<Bin>> gatherReadyBins(core::ProcessContext &context);
+ void processReadyBins(std::deque<std::unique_ptr<Bin>> ready_bins, core::ProcessSession &session);
Review Comment:
Added comment https://github.com/apache/nifi-minifi-cpp/pull/1616#issuecomment-1660008176
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1275836056
##########
libminifi/src/io/StreamSlice.cpp:
##########
@@ -23,7 +23,8 @@ namespace org::apache::nifi::minifi::io {
StreamSlice::StreamSlice(std::shared_ptr<io::InputStream> stream, size_t offset, size_t size) : stream_(std::move(stream)), slice_offset_(offset), slice_size_(size) {
stream_->seek(slice_offset_);
if (stream_->size() < slice_offset_ + slice_size_)
- throw std::invalid_argument("StreamSlice is bigger than the Stream");
+ throw std::invalid_argument("StreamSlice is bigger than the Stream, Stream size: " + std::to_string(stream_->size()) +
+ ", StreamSlice size: " + std::to_string(slice_size_) + ", offset: " + std::to_string(slice_offset_));
Review Comment:
Updated in 8a269048b9b6f451f0baedd584a4358286908a60
##########
extensions/libarchive/MergeContent.cpp:
##########
@@ -246,27 +247,30 @@ bool MergeContent::processBin(core::ProcessContext *context, core::ProcessSessio
mimeType = "application/zip";
} else {
logger_->log_error("Merge format not supported %s", mergeFormat_);
+ session.remove(merge_flow);
return false;
}
std::shared_ptr<core::FlowFile> mergeFlow;
Review Comment:
Removed in 8a269048b9b6f451f0baedd584a4358286908a60
##########
extensions/libarchive/MergeContent.cpp:
##########
@@ -213,18 +213,19 @@ bool MergeContent::processBin(core::ProcessContext *context, core::ProcessSessio
});
}
- std::shared_ptr<core::FlowFile> merge_flow = std::static_pointer_cast<FlowFileRecord>(session->create());
+ std::shared_ptr<core::FlowFile> merge_flow = std::static_pointer_cast<FlowFileRecord>(session.create());
Review Comment:
Good idea, updated in 8a269048b9b6f451f0baedd584a4358286908a60
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "szaszm (via GitHub)" <gi...@apache.org>.
szaszm commented on code in PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#discussion_r1279544211
##########
extensions/libarchive/BinFiles.h:
##########
@@ -284,19 +285,24 @@ class BinFiles : public core::Processor {
protected:
// Allows general pre-processing of a flow file before it is offered to a bin. This is called before getGroupId().
- virtual void preprocessFlowFile(core::ProcessContext *context, core::ProcessSession *session, const std::shared_ptr<core::FlowFile>& flow);
+ virtual void preprocessFlowFile(const std::shared_ptr<core::FlowFile>& flow);
// Returns a group ID representing a bin. This allows flow files to be binned into like groups
- virtual std::string getGroupId(core::ProcessContext* /*context*/, const std::shared_ptr<core::FlowFile>& /*flow*/) {
+ virtual std::string getGroupId(const std::shared_ptr<core::FlowFile>& /*flow*/) {
return "";
}
// Processes a single bin.
- virtual bool processBin(core::ProcessContext* /*context*/, core::ProcessSession* /*session*/, std::unique_ptr<Bin>& /*bin*/) {
+ virtual bool processBin(core::ProcessSession& /*session*/, std::unique_ptr<Bin>& /*bin*/) {
return false;
}
// transfer flows to failure in bin
- static void transferFlowsToFail(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void transferFlowsToFail(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
// moves owned flows to session
- static void addFlowsToSession(core::ProcessContext *context, core::ProcessSession *session, std::unique_ptr<Bin> &bin);
+ static void addFlowsToSession(core::ProcessSession &session, std::unique_ptr<Bin> &bin);
+
+ bool resurrectFlowFiles(core::ProcessSession &session);
+ void assumeOwnerShipOfNextBatch(core::ProcessSession &session);
+ std::deque<std::unique_ptr<Bin>> gatherReadyBins(core::ProcessContext &context);
+ void processReadyBins(std::deque<std::unique_ptr<Bin>> ready_bins, core::ProcessSession &session);
Review Comment:
Could you write a comment explaining the inner working of BinFiles and MergeContent, as a class or file level comment? I guess you had to understand it to some degree to make this change, and I would appreciate sharing this knowledge.
If that's too big of an ask, could you document just the concepts related to this patch?
Some words worth explaining IMO:
- resurrect (flow file)
- batch
- bin
- ready bin
- preprocess (flow file)
- group
- bundle
- entry
Or just the ones related to this PR:
- resurrect (flow file)
- batch (how is it different from bin, group, bundle, etc.)
- ready bins
This would also help with reviewing.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on PR #1616:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616#issuecomment-1660008176
Some overview of the inner workings of MergeContent:
- Resurrect flow file is the process of restoring the unprocessed flow files from the flow file repository after restart. This is done for each processor and in case of the MergeContent this also means restoring flow files previously stored in the internal Self relationship. After restoring these flow files they also have to be sorted into their respective bins to restore the same bin state as before the restart.
- Batches and batch size represent the maximum number of flow files to be processed from the incoming relationship.
- A bin represents a set of flow files that belong together defined by the processor properties. In MergeContent correlated flow files are defined by the `CorrelationAttributeName` property which defines the attribute that provides the `groupid` for the bin the flow file belongs to.
- When a bin reaches a limit defined by the maximum age or the maximum size, the bin becomes ready, and ready bins can be merged.
- Preprocess flow file only checks for deprecated attributes and sets the value of the deprecated attribute to the value of the new renamed attribute.
- Groups are set of bins with the same groupid. It can happen that a bin cannot accept a new flow files because it would go above its size limit for example, so a new bin is created with this new flow file and added to the same group of bins.
- I think bundle is just a synonym for bin in the user descriptions. It is more understandable from a user's perspective than bin.
- Entry is a member flow file of a bin
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi-minifi-cpp] fgerlits closed pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
Posted by "fgerlits (via GitHub)" <gi...@apache.org>.
fgerlits closed pull request #1616: MINIFICPP-2173 Fix MergeContent error handling issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/1616
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org