Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21837

Binaries garbage collection doesn't need transaction in sweep phase

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.10, 8.10, 9.1-SNAPSHOT
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Core

      Description

      Currently, using the script $NUXEO_HOME/client/scripts/deleteOrphanBinaries.groovy can lead to transaction timeouts in the logs. If there are many binaries to garbage collect and the database or the binaries storage subsystem is slow then this can take hours.

      The transaction timeout is produced in the logs but note that the GC has still been done correctly.

      A workaround is to update the script to set a higher transaction timeout:

      TransactionHelper.commitOrRollbackTransaction();
      TransactionHelper.startTransaction(10*60*60); // 10 hours
      

      However it would be better to do the sweep phase (BinaryGarbageCollector.stop) outside a transaction in the binary managers that don't need one.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ffischer Frantz Fischer
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: