Skip to content
  • Daniel Vrátil's avatar
    Refactor external payload parts handling and implement levelled cache · cb24efd0
    Daniel Vrátil authored
    External payload files are now stored in levelled folder hierarchy. Currently we
    implement one level of indirection using modulo 100 of Part.id(). Using modulo
    100 ensures even distribution of files into the subdirectories. The migration is
    implemented in StorageJanitor, so it can be triggered manually by running
    akonadictl fsck.
    
    Handling of access to external files has been refactored to ExternalPartStorage
    class. This class implements access to the legacy flat-cache hierarchy as well
    as simple transactional system. The transactional system allows us to rollback
    or commit changes in the external files: file created in the transaction are
    deleted when the transaction is rolled back, and file deletion is delayed until
    the transaction is committed. This allows us to control the files from outside
    PartStreamer and tie it to committing of database transaction, which is more
    likely to fail than the EPS transaction. This should prevent us from losing
    cached parts when error occurs during update.
    
    BUG: 338402
    FIXED-IN: 15.12.0
    cb24efd0