You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/01/31 11:04:35 UTC

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #723: MINIFICPP-1140 - Fix VolatileFlowFileRepository

bakaid commented on a change in pull request #723: MINIFICPP-1140 - Fix VolatileFlowFileRepository
URL: https://github.com/apache/nifi-minifi-cpp/pull/723#discussion_r373426442
 
 

 ##########
 File path: libminifi/include/core/repository/VolatileRepository.h
 ##########
 @@ -280,6 +290,19 @@ bool VolatileRepository<T>::Put(T key, const uint8_t *buf, size_t bufLen) {
   logger_->log_debug("VolatileRepository -- put %u %u", current_size_.load(), current_index_.load());
   return true;
 }
+
+template<typename T>
+bool VolatileRepository<T>::MultiPut(const std::vector<std::pair<T, std::unique_ptr<io::DataStream>>>& data) {
+  bool success = true;
+  for (const auto& item : data) {
+    success &= Put(item.first, item.second->getBuffer(), item.second->getSize());
 
 Review comment:
   This does not result in a transacted MultiPut, but I am not sure how that can be achieved with the current architecture of the VolatileRepositories. A rethink of the entire implementation is definitely needed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services