szaszm commented on a change in pull request #857:
URL: https://github.com/apache/nifi-minifi-cpp/pull/857#discussion_r480027949



##########
File path: libminifi/include/ResourceClaim.h
##########
@@ -45,8 +45,10 @@ extern std::string default_directory_path;
 extern void setDefaultDirectory(std::string);
 
 // ResourceClaim Class
-class ResourceClaim : public std::enable_shared_from_this<ResourceClaim> {
+class ResourceClaim {
  public:
+  // the type which uniquely represents the resource for the owning manager
+  using Path = std::string;

Review comment:
       Shouldn't this be a class template parameter? 
   
   The two parameter ctor looks like it should use this type alias for its 
first `path` parameter.

##########
File path: libminifi/src/core/ProcessSession.cpp
##########
@@ -939,9 +939,7 @@ void ProcessSession::persistFlowFilesBeforeTransfer(
         if (ff->isStored() && flowFileRepo->Delete(ff->getUUIDStr())) {
           // original must be non-null since this flowFile is already stored 
in the repos ->
           // must have come from a session->get()
-          auto claim = original->getResourceClaim();
-          // decrement on behalf of the persisted-instance-to-be-deleted
-          if (claim) claim->decreaseFlowFileRecordOwnedCount();

Review comment:
       Could you explain this change? Why is it no longer necessary to decrease 
the refcount here?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to