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/02/05 10:40:25 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_r375180067
 
 

 ##########
 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:
   That would still not be in a transaction. An another thread might have updated or deleted and reinserted one of those keys, which we would be deleting with your suggested method.

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