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/08/24 14:42:15 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #877: MINIFICPP-1339 - Reopen rocksdb database when space becomes available on the disk

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



##########
File path: extensions/rocksdb-repos/RocksDbStream.h
##########
@@ -160,7 +160,7 @@ class RocksDbStream : public io::BaseStream {
 
   std::string value_;
 
-  rocksdb::DB *db_;
+  gsl::not_null<minifi::internal::RocksDatabase*> db_;

Review comment:
       https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#note-392 Last sentence of "Exceptions":
   > Note that using a reference member is almost always wrong.
   Sadly there is no explanation and I couldn't find one elsewhere either.
   
   I was not aware of the convention either, that taking a reference indicates not storing it. Do you have any resources explaining it? My disk space watchdog PR is affected because it takes ctor args by reference just to store them in a `gsl::not_null<T*>` member.




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