On Sat, Jan 1, 2022 at 8:20 PM Mark Thomas <ma...@apache.org> wrote: > > Hi all, > > Probably questions for Rémy but any input welcome. > > I'm looking at SpotBugs and it has a few warning for this class. My > questions are: > > 1. Should the methods the modify the database (createXXX, modifiedXXX, > removedXXX) use writeLock rather than readLock?
This is copy/pasted from MemoryUserDatabase. I think this is probably as intended, this prevents a concurrent read, and the only actual write operation is persisting to the database. > 2. What sequence of actions between saves are meant to be supported? I'm > thinking about combinations of create/modify/delete? Any. Hopefully the user is a bit reasonable ;) It should work like the MemoryUserDatabase, modifications occur locally until the save operation which updates the database. The test case has scenarios, so if you find some more that you want to have supported they can be added there ... For example, if a user is created: - createdUsers.put and modifiedUsers.remove - the if you modify it, it won't do anything more since the user is already in createdUsers Rémy > Thanks, > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org