OCFL / ocfl-java

A Java OCFL implementation
MIT License
18 stars 12 forks source link

change db lock implementation to not hold the connection open #37

Closed pwinckles closed 3 years ago

pwinckles commented 3 years ago

Resolves https://github.com/UW-Madison-Library/ocfl-java/issues/36

Changes the db lock implementation to no longer hold the a db connection open, which is not great because S3 writes can be slow, and instead create an entry in the lock table when a lock is acquired. The entry is deleted when the lock is released. If the process dies without releasing the lock, the lock will expire after a configurable period of time passes.

This is a braking change from the earlier versions in that the schema for the object lock table has changed. Users should drop their existing table prior to upgrading.

DROP TABLE ocfl_object_lock;