Skip to content

[DocumentUrlDb] Reduce implicit filesystem usage from DB transactions

Stefan Brüns requested to merge work/bruns/cleanup_docurldb into master

Ideally, the DB transactions would be totally independent from the filesystem, as it creates several problems:

  • Inotify is path based, thus is the MetadataMover - it can be handled in the DB, any filesystem accesses may be out of order with the Inotity events
  • The BasicIndexingJob already has the id and parentId, doing another lookup is unnecessary at best, and possibly racy in case of renames
  • Using inode numbers in unit tests creates indeterminism

Split the implicit creation of parent documents from DocumentUrlDB::put, so the latter becomes FS independent.

For backwards compatibility with the calling code, the parent tree is still created from the transaction.

Merge request reports