markap14 commented on code in PR #11231:
URL: https://github.com/apache/nifi/pull/11231#discussion_r3222285434
##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java:
##########
@@ -1507,7 +1508,8 @@ public void trigger(final ComponentNode component) {
LOG.info("Starting {} Connectors",
startConnectorsAfterInitialization.size());
for (final ConnectorNode connectorNode :
startConnectorsAfterInitialization) {
try {
- final ConnectorNode existingConnector =
connectorRepository.getConnector(connectorNode.getIdentifier());
+ // The connector is about to begin running; ensure it
starts with the latest provider configuration.
+ final ConnectorNode existingConnector =
connectorRepository.getConnector(connectorNode.getIdentifier(),
ConnectorSyncMode.SYNC_WITH_PROVIDER);
Review Comment:
Fixed. The deferred-start loop in `onFlowInitialized` no longer pre-syncs;
the pre-loop `getConnector(..., SYNC_WITH_PROVIDER)` (used only to detect
whether the connector still exists) is now `LOCAL_ONLY`, since the start path
itself doesn't read provider state.
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardConnectorDAO.java:
##########
@@ -125,43 +131,44 @@ public void deleteConnector(final String id) {
@Override
public void startConnector(final String id) {
- final ConnectorNode connector = getConnector(id);
+ // The connector is about to begin running; ensure it is started with
the latest provider configuration.
+ final ConnectorNode connector = requireConnector(id,
ConnectorSyncMode.SYNC_WITH_PROVIDER);
getConnectorRepository().startConnector(connector);
Review Comment:
Done. `StandardConnectorDAO.startConnector(String)` now uses `LOCAL_ONLY` to
look up the connector node before delegating to the repository, since the start
operation itself only reads active flow context.
--
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]