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

Improve the sequenceHexRandomized retry mechanism

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2025.x, 2023.20, 2021.61
    • Component/s: Core MongoDB
    • Release Notes Summary:
      The MongoDB sequenceHexRandomized retry mechanism has a maximum duration of 250 ms.
    • Backlog priority:
      800
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #122, nxplatform #123
    • Story Points:
      3

      Description

      When using an idType of based on a random hex sequence (sequenceHexRandomized), under high concurrency (240 threads on 6 nodes) it has been seen that lots of threads are waiting and failing with a ConcurrentUpdateException while asking for a sequence.

      org.nuxeo.ecm.core.api.ConcurrentUpdateException: Failed to update randomized sequence
      	at org.nuxeo.ecm.core.storage.mongodb.MongoDBConnection.updateRandomizedSequence(MongoDBConnection.java:403)
      	at org.nuxeo.ecm.core.storage.mongodb.MongoDBConnection.getNextSequenceId(MongoDBConnection.java:330)
      
      

      Today the retry using a jitter and an exponential backoff that can take minutes before failing and the retry delay is greater than 16s, this is bad to handle concurrency, the backoff should have a maximum duration between retry fixed to something like 250ms.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: