sahvx655-wq opened a new pull request, #1014: URL: https://github.com/apache/tomcat/pull/1014
This PR fixes a concurrency issue in MemoryUserDatabase.save() where file rename operations were performed after releasing the writeLock. Under concurrent save requests, multiple threads could interfere with the same .new and .old files, leading to IOExceptions or inconsistent tomcat-users.xml state. This change extends the writeLock scope to cover the complete file replacement workflow, ensuring the save operation remains atomic. Changes Hold writeLock until all rename operations complete Move backup/rename logic inside the protected section Add TestMemoryUserDatabaseConcurrency.java regression test -- 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]
