Make Criteria immutable after load_async is called

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In https://jira.mongodb.org/browse/MONGOID-5445, asynchronous query execution was implemented.

      When a Criteria object is flagged for async execution, it may begin executing immediately. Modifying the object further (e.g. by adding conditions) could result in the actual query both respecting these modifications and ignoring them, depending on how the threads are scheduled.

      Ideally modifications of the Criteria object should be disallowed after load_async is invoked.

      AR does not disallow modifying criteria either, leaving it up to the user to ensure correct operation.

            Assignee:
            Unassigned
            Reporter:
            Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: