- Added a Database Access Lock object
- Access log lets OperationCriticalTransactions through
- Transactions skip query access log check
- executeTransaction returns a Future to allow easier synchronization
- ServerInfo waits for the server to be registered. This could lead
to issues if a new server is registering to old database. It should
not be too big of an issue since no patches need to be applied
on first enable of the database.
- Added database states: CLOSED <-> INITIALIZING -> OPEN -> CLOSED
These two changes allow restricting queries to the database until the
database has properly initialized (Schema is in correct format)
- Removed SQLDB as a Patch class variable
Tests use Guava direct thread executor on the database to reduce
concurrency issues during tests. Another option would be to wait for
each transaction.
- Removed SaveOperations#session
- Removed DBSystem dependency from SessionCache, so SessionCache does
not need to be called from async thread. (SessionCache does not save,
responsibility now with the caller)
- Refactored UsersTable#getSavedUUIDs to a query
- Removed #getRegisterDates, #updateName, #getAllTimesKicked,
#getUUIDsAndNamesByID - not used
- Refactored UserInfoTable#getSavedUUIDs to a query
- Removed UserInfoTable#getServerUserInfo - not used
- Refactored ServerInfo classes a bit in this commit, made them use
Optional<Server> instead of Optional<Integer> (server id)
- Removed all uses of FetchOperations#getServerId
- Function<String, String> in GeoInfoStoreTransaction
- Unused throws clause in Version10Patch
- Bad variable name in UsersTable
- Fixed WorldTimesQueries again
- Fixed accidental breakage of a WorldTimes query
Fixed Smells, Level Major (SonarCloud):
- Use of keySet instead of entrySet in LargeStoreQueries
- Unused variable in NicknameQueries now used
- Unused fields removed from UsersTable
- Unused fields removed from PlayerProcessors
- Same variable name as field in WorldMap
- Sorted out SessionQueries ORDER BY usefulness with a TreeMap
Level Critical (SonarCloud):
- Smell: Duplicated String literals in the Queries: " FROM ", " WHERE ",
" AND ", etc
- Smell: GeoInfoStoreTransaction static value assignment
- Smell: Patch - Duplicate switch case
- Smell: DataCache - Empty constructor without comment