aogburn commented on code in PR #882:
URL: https://github.com/apache/tomcat/pull/882#discussion_r2282695727
##########
java/org/apache/catalina/session/FileStore.java:
##########
@@ -217,16 +233,21 @@ public Session load(String id) throws
ClassNotFoundException, IOException {
@Override
public void remove(String id) throws IOException {
File file = file(id);
- if (file == null) {
+ if (file == null || !file.exists()) {
Review Comment:
There is no actual data consumption or modification here at this point so it
should not be sensitive to any concurrent operations for any locking
requirements. We can just check the file existence here without locking and if
it doesn't exist, quickly return with no further operation needed as we already
know without locking that there will be no file to remove.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]