szaszm commented on code in PR #1568:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1568#discussion_r1187114195
##########
docker/test/integration/features/CMakeLists.txt:
##########
@@ -87,6 +87,10 @@ if (ENABLE_PROMETHEUS)
set(ENABLED_BEHAVE_TESTS
"${ENABLED_BEHAVE_TESTS};${CMAKE_CURRENT_SOURCE_DIR}/prometheus.feature")
endif()
+if (NOT DISABLE_CURL AND NOT DISABLE_CONTROLLER)
+ set(ENABLED_BEHAVE_TESTS
"${ENABLED_BEHAVE_TESTS};${CMAKE_CURRENT_SOURCE_DIR}/minifi_controller.feature")
Review Comment:
`list(APPEND` would be more descriptive
##########
libminifi/include/FlowController.h:
##########
@@ -149,6 +149,22 @@ class FlowController : public
core::controller::ForwardingControllerServiceProvi
std::map<std::string, std::unique_ptr<io::InputStream>> getDebugInfo()
override;
private:
+ class UpdateState {
+ public:
+ void beginUpdate() {
+ ++update_block_count_;
+ }
+ void endUpdate() {
+ --update_block_count_;
+ }
+ bool isUpdating() const {
+ return update_block_count_ > 0;
+ }
+
+ private:
+ std::atomic<uint32_t> update_block_count_;
+ };
+
Review Comment:
A scoped solution would be better in that it's impossible to forget closing
an opened update block. Maybe we could even use std::scoped_lock to track
update blocks.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]