You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "sahvx655-wq (via GitHub)" <gi...@apache.org> on 2026/05/29 07:04:40 UTC
[PR] Ensure atomic session persistence in FileStore using write-then-rename pattern [tomcat]
sahvx655-wq opened a new pull request, #1016:
URL: https://github.com/apache/tomcat/pull/1016
Updated FileStore.save(Session) to use an atomic write-then-rename pattern. Previously, session data was written directly to the final file, which could leave partially written or inconsistent session state if the process was interrupted during persistence. The new logic writes to a temporary .tmp file first and renames it only after a successful write, improving persistence reliability and reducing the risk of corruption.
--
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: dev-unsubscribe@tomcat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [PR] Ensure atomic session persistence in FileStore using write-then-rename pattern [tomcat]
Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf closed pull request #1016: Ensure atomic session persistence in FileStore using write-then-rename pattern
URL: https://github.com/apache/tomcat/pull/1016
--
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: dev-unsubscribe@tomcat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [PR] Ensure atomic session persistence in FileStore using write-then-rename pattern [tomcat]
Posted by "sahvx655-wq (via GitHub)" <gi...@apache.org>.
sahvx655-wq commented on PR #1016:
URL: https://github.com/apache/tomcat/pull/1016#issuecomment-4677657554
I have updated the implementation to handle existing destination files more reliably and pushed the changes for review.
--
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: dev-unsubscribe@tomcat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [PR] Ensure atomic session persistence in FileStore using write-then-rename pattern [tomcat]
Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf commented on PR #1016:
URL: https://github.com/apache/tomcat/pull/1016#issuecomment-4727411678
Thanks for the updated PR. I have applied it manually with a slightly modified try/finally structure as there were code paths (e.g. `IOException` during session write) where the temporary file would not have been deleted.
--
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: dev-unsubscribe@tomcat.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org