NIFI-15655 - Flaky System Test FlowSynchronizationIT.testUnnecessaryProcessorsAndConnectionsRemoved#10946
NIFI-15655 - Flaky System Test FlowSynchronizationIT.testUnnecessaryProcessorsAndConnectionsRemoved#10946pvillard31 wants to merge 3 commits intoapache:mainfrom
Conversation
…rocessorsAndConnectionsRemoved
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for digging into this issue @pvillard31, improving system test stability is very useful for some of these unstable tests.
Including the sanity check looks helpful with the Leader Election Manager as a framework extension point, but the note in the description about ZooKeeper behavior raises another question. Reviewing the CuratorLeaderElectionManager, are there changes at that level which could prevent this from happening?
|
It looks like the Curator |
|
That is a very good point, thanks for catching that @exceptionfactory - I pushed a commit to improve this code path on the curator side. |
Summary
NIFI-15655 - Flaky System Test FlowSynchronizationIT.testUnnecessaryProcessorsAndConnectionsRemoved
During the disconnect/reconnect cycle, ZooKeeper leader election can transiently return an address without a port. Previously, this caused an
ArrayIndexOutOfBoundsException— which, while caught byHeartbeatSendTask's catch (Throwable), produced an opaque error.With this change, both layers now throw a proper
ProtocolExceptionwith a clear message. TheProtocolExceptionis still caught by the same catch (Throwable) handler inHeartbeatSendTask.run(), the heartbeat task continues running, and the next cycle succeeds once leader election stabilizes. The clearer exception type and message makes the transient condition easier to diagnose in logs.Modified some tests to improve reliability and have the proper wait conditions.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation