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/02/07 10:26:25 UTC
[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1485: MINIFICPP-2024 Refactor repository hierarchy
lordgamez commented on code in PR #1485:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1485#discussion_r1098469358
##########
libminifi/src/core/repository/VolatileContentRepository.cpp:
##########
@@ -86,7 +89,7 @@ std::shared_ptr<io::BaseStream> VolatileContentRepository::write(const minifi::R
if (claim_check != master_list_.end()) {
return std::make_shared<io::AtomicEntryStream<ResourceClaim::Path>>(claim.getContentFullPath(), claim_check->second);
} else {
- auto *ent = new AtomicEntry<ResourceClaim::Path>(¤t_size_, &max_size_);
+ auto *ent = new AtomicEntry<ResourceClaim::Path>(&repo_data_.current_size, &repo_data_.max_size);
Review Comment:
I'm not sure if it's a good idea as it is stored in the `master_list_` as a raw pointer where the ownership is not trivial. We have the `value_vector` of the repo data and the `master_list_` and the ownership between those 2 needs to be clarified first to see how the ownership should be handled.
--
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