Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-71985

Automatically retry time series insert on DuplicateKey error

    • Storage Execution
    • Fully Compatible
    • v6.3, v6.0, v5.0
    • Execution Team 2023-03-20, Execution Team 2023-04-03, Execution Team 2023-04-17

      Due to the way we generate time series bucket _id values, it's possible that some inserts to time series collection will see unexpected DuplicateKey errors. For the most part, these errors are transient and retrying the insert will succeed. Some of our users already use this workaround. We can automate it by automatically retrying the the operation internally.

      The only caveat is that in some degenerate cases, the retry may not succeed, or may only succeed with very low probability, so we should limit the number of retries (unlike a WriteConflict where we'll retry indefinitely).

            yuhong.zhang@mongodb.com Yuhong Zhang
            dan.larkin-york@mongodb.com Dan Larkin-York
            0 Vote for this issue
            11 Start watching this issue