[
https://issues.apache.org/jira/browse/NIFI-15307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18050699#comment-18050699
]
ASF subversion and git services commented on NIFI-15307:
--------------------------------------------------------
Commit fd41c45291856d7b37cd424fc2037c2e1f86c664 in nifi's branch
refs/heads/main from Alaksiej Ščarbaty
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=fd41c45291 ]
NIFI-15307 Updated ConsumeKinesis to wait for long initialization in onTrigger
(#10664)
Signed-off-by: David Handermann <[email protected]>
> ConsumeKinesis initialization timeout
> -------------------------------------
>
> Key: NIFI-15307
> URL: https://issues.apache.org/jira/browse/NIFI-15307
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 2.6.0, 2.7.0, 2.7.1
> Reporter: Alaksiej Ščarbaty
> Assignee: Alaksiej Ščarbaty
> Priority: Major
> Time Spent: 1h
> Remaining Estimate: 0h
>
> {{ConsumeKinesis}} processor waits for the AWS objects
> creation/initialization in its OnScheduled method. During a first run, this
> operation may take up to 10 minutes, caused by index creation in DynamoDB. On
> subsequent runs it's much faster - a matter of few seconds. The default value
> for {{nifi.processor.scheduling.timeout}} is 1 minute, which is not enough
> for the initial initialization.
>
> This results in {{InterruptedException}} during the initialization. This
> doesn't cancel index creation on AWS, so after a few retries the processor
> spins up successfully. Yet, these errors don't provide the best UX.
>
> Instead a hybrid approach with waiting in OnScheduled and onTrigger should be
> used.
> Wait for 30 seconds in the {{@OnScheduled}} first.
> If this isn't the first run of the processor, the initialization should take
> a couple of seconds - entirely within the {{{}@OnScheduled{}}}.
> If not, then we log a {{warn}} with the message that the initialization may
> take longer, up to 10 minutes. And do the check in the {{onTrigger}} ,
> {{{}yield{}}}ing if necessary.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)