Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent fallback to existing jobs index #2644

Merged
merged 1 commit into from
Apr 5, 2023

Commits on Apr 5, 2023

  1. fix: Prevent fallback to existing jobs index

      The in-progress jobs query for the export feature relies on the
      presence of a very specific index to be fast on cozies with a lot of
      `io.cozy.jobs` documents.
    
      To make sure the index presence detection goes well, we forced a sort
      on the `worker` attribute.
      However, since `cozy-stack` uses an index on `worker` and `state`
      only, CouchDB fallbacks to this index instead of detecting the index
      we want does not exist and runs the slow `$or` query in-memory.
      See apache/couchdb#4511 for more details on
      this issue.
    
      To prevent this fallback we will sort on a second attribute not present
      in the existing `cozy-stack` index: `message.slug`.
    taratatach committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    b9ef628 View commit details
    Browse the repository at this point in the history