ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: django
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      django-tasks-db is the ORM-backed backend for Django Tasks, the queue that ships with Django 6.0. We have two approaches. Should we leverage a third-party backend for Django Tasks, or should we work directly with the callback hooks and make our own implementations?

      A spike resolved claiming by adding an override point to DatabaseBackend in django-tasks-db, with the MongoDB implementation subclassing it from django-mongodb-extensions. It leaves django-tasks-db free of MongoDB-specific code, claims each task exactly once under contention, and leaves SQLite unchanged at 97 passing tests with its original 16 skips. The prototype, the reproductions and a draft upstream issue are in this gist.

      Someone needs to also re-spike this ticket to investigate using it without the third party library

      Definition of done

      • Agree whether to leverage the third party extension or manage the implementation ourselves in django-mongodb-extensions.

      Pitfalls

      • Maintainer could decline, requiring us to push forward with our own solution.
      • Don't branch on has_select_for_update. SQLite reports False too and relies on BEGIN EXCLUSIVE, so keying on that flag routes SQLite down the wrong path.
      • migrate crashes on MongoDB until INTPYTHON-1082 lands, or until django-mongodb-extensions carries the interim index patch from the gist.

            Assignee:
            Rishabh Bisht
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: