NIFI-15862: Moved Processors to using Virtual Threads with a Semaphor…#11164
NIFI-15862: Moved Processors to using Virtual Threads with a Semaphor…#11164markap14 wants to merge 2 commits into
Conversation
00c6167 to
c0cf8b2
Compare
64459cf to
8f34b35
Compare
| if (tempDirectory != null) { | ||
| try { | ||
| Files.deleteIfExists(tempDirectory); | ||
| } catch (final IOException ignored) { |
There was a problem hiding this comment.
Should we at least log this at debug so that a recurring failure to delete nifi-thread-dump-* directories is discoverable?
There was a problem hiding this comment.
Sure, that's reasonable.
| } | ||
|
|
||
| private static String buildThreadName(final Connectable connectable, final int taskIndex) { | ||
| return connectable.getName() + "[type=" + connectable.getComponentType() + ", id=" + connectable.getIdentifier() |
There was a problem hiding this comment.
What if the user renames the component and/or its parent group? would that be properly reflected?
There was a problem hiding this comment.
The thread name would get generated whenever the Processor is started. It would not change. The only ways to change it would be to track all Virtual Thread objects so that setName could update them, or to constantly update it to whatever the current name is. Both introduce a decent bit of complexity for what I'd argue is fairly minimal gain. Especially since I don't think we even allow changing the name of the processor while it's running from the UI. I think the REST tier does allow it, but the UI would not, though I may be mistaken.
|
[claude-opus-4.7] @pvillard31 thanks for the latest round of feedback. The new commit (2c0e041) addresses your remaining comments and rebases onto current
The earlier review-feedback commit (0abffe2) is also still on the branch and covers the prior round of comments: atomic schedule rollback (#3), thread tracking + |
|
[claude-opus-4.7] @markap14 important: I had to revert my last push. When you asked me to rebase against I have force-pushed the branch back to the previous tip What still needs to happen, in your hands:
- } catch (final IOException ignored) {
+ } catch (final IOException e) {
+ logger.debug(\"Failed to delete temporary thread-dump directory {}\", tempDirectory, e);
}(plus the
Sorry for the churn. Watcher subagent is stopping until you let me know how you'd like to proceed. |
…e bounding how many tasks can be run at once
…e bounding how many tasks can be run at once
Summary
NIFI-00000
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