adam-markovics commented on a change in pull request #1107:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1107#discussion_r676519996
##########
File path: extensions/sql/processors/QueryDatabaseTable.cpp
##########
@@ -220,7 +219,9 @@ void
QueryDatabaseTable::initializeMaxValues(core::ProcessContext &context) {
logger_->log_info("Found no stored state");
} else {
if (!loadMaxValuesFromStoredState(stored_state)) {
+ state_manager_->beginTransaction();
state_manager_->clear();
+ state_manager_->commit();
Review comment:
From now on state transactions begin with beginTransaction and end with
either commit or rollback. In onTrigger beginTransaction and commit (or
rollback) are called automatically by the creation and commit/rollback calls on
ProcessSession. Processor::onTrigger wraps the calling of the derived
processor's onTrigger (different signature) and manages the session.
This method above is called from onSchedule. For onSchedule there is no
session, so it has to be manual.
##########
File path: cmake/BuildTests.cmake
##########
@@ -151,11 +151,13 @@ SET(INT_TEST_COUNT 0)
FOREACH(testfile ${INTEGRATION_TESTS})
get_filename_component(testfilename "${testfile}" NAME_WE)
add_executable("${testfilename}" "${TEST_DIR}/integration/${testfile}")
+ target_wholearchive_library("${testfilename}" minifi-standard-processors)
Review comment:
UnorderedMapKeyValueStoreService (or some other state storage) has to be
registered, otherwise we can't use it. Registration is done at static
initialization time using the REGISTER_RESOURCE macro. It would be optimized
out if not linked and test would fail.
--
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]