You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "dan-s1 (via GitHub)" <gi...@apache.org> on 2025/03/31 15:16:01 UTC
[PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
dan-s1 opened a new pull request, #9829:
URL: https://github.com/apache/nifi/pull/9829
<!-- Licensed to the Apache Software Foundation (ASF) under one or more -->
<!-- contributor license agreements. See the NOTICE file distributed with -->
<!-- this work for additional information regarding copyright ownership. -->
<!-- The ASF licenses this file to You under the Apache License, Version 2.0 -->
<!-- (the "License"); you may not use this file except in compliance with -->
<!-- the License. You may obtain a copy of the License at -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
# Summary
[NIFI-14399](https://issues.apache.org/jira/browse/NIFI-14399)
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
### Pull Request Formatting
- [ ] Pull Request based on current revision of the `main` branch
- [ ] Pull Request refers to a feature branch with one commit containing changes
# Verification
Please indicate the verification steps performed prior to pull request creation.
### Build
- [ ] Build completed using `mvn clean install -P contrib-check`
- [ ] JDK 21
### Licensing
- [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [ ] Documentation formatting appears as expected in rendered files
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2770523562
interesting https://inside.java/2022/05/25/clean-cleaner/
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2770539985
@joewitt If we want to use `Cleaners` could a new ticket be created for that?
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2772728727
While we're waiting for you to merge this...does this mean this moment is.... the final countdown?
man i hope that joke lands as funny as it is in my own head
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2766838881
I suppose if we have process sessions which are yet to be rolled back yet we've been willing to just let the reference dangle...we have deeper problems. Given the finalize call is going away there likely isn't much we can or should do here anyway. It was a nice peace of mind thing...
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2766574423
@markap14 When speaking with @exceptionfactory regarding this change. He felt the use of `finalize() ` looks like a failsafe attempt to rollback dating back to project inception which now he feels should be removed but he wanted me to check with you since changes to `StandardProcessSession` are far more important and potentially dangerous.
Thank you for your help!
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory merged PR #9829:
URL: https://github.com/apache/nifi/pull/9829
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "joewitt (via GitHub)" <gi...@apache.org>.
joewitt commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2772904610
always good to know who my fellow dad jokes/humor friends are. I see you!
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2772899879
@joewitt Did you mean the `finalize(d) `countdown? :)
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "sfc-gh-mpayne (via GitHub)" <gi...@apache.org>.
sfc-gh-mpayne commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2770444657
I think this is probably okay. This exists as a safeguard against buggy Processors. In particular, if you create a Processor that extends AbstractSessionFactoryProcessor, you have full control over the ProcessSession. This ensures that if that processor calls `ProcessSession.read`, `ProcessSession.write` etc. that we eventually can clean up those resources. And if it pulls FlowFiles off of a queue and never commits or rolls back the session they can eventually be re-queued without a restart of NiFi, instead of letting the FlowFiles kind of exist in the ether.
So it helped to kind of ensure that we do all we can to protect ourselves against buggy Processors. But at the end of the day, there's really only so much we can do. Processors can still open sockets, file handles, etc. and fail to close them and leak resources that way. And they could still potentially hold on to references to the Process Sessions, preventing the finalizer from being called also.
While I think it is nice to have it there, given the deprecation of finalizers, it's probably reasonable to just remove the method.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14399 Removed finalize method from StandardProcessSession. [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on PR #9829:
URL: https://github.com/apache/nifi/pull/9829#issuecomment-2770485168
@sfc-gh-mpayne Thanks for getting back. Although `finalize` is going away the suggested replacement is the use of `Cleaner`. Is that something which should be looked into?
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org