Bug #3019
closedRemove usage of .lastid files within the registry
0%
Description
The registry currently relies on a .lastid file residing within the skin folder for each skin in use. This file is used to keep track of the last accession number used for insertion, but should be removed as it causes configuration issues: it sometimes must be manually seeded to be correct, it must be writable by the apache user, and it isn't thread-safe.
To replace the file, the server should always be queried through getLastDocid (getLastId in the Perl bindings) for the highest accession number within a given scope, and only use this canonical resource.
Updated by Shaun Walbridge about 16 years ago
Fixed in r4378. Instead of storing the last used id (lastid) on disk, just perform a lookup each time, eliminating the pain-point of needing to set the permissions correctly on each .lastid file.
Removed updateLastId() function, consolidated everything under newAccessionNumber(). Rewrote the insertMetadata() call and associated 'updating' code accordingly. If conflicts do arise, we should fix them by changing things in getMaxDocId within DBUtil.java directly.