Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-850

Problems creating records due to batch insert implementation

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Sometimes, and I wasn't able to deterministically reproduce the problem, when you try to create a record, Thread.current[:mongoid_batch_insert] is erroneously set and never executed and therefore the records never gets persisted...

      By the way, is there any good reason why you are using a local thread variable, which is basically a global variable, for controlling this stuff?

      I was trying to isolate the problem and fix it but I couldn't get the specs suite to run without failing so I didn't feel confident of going and making changes to the codebase.

            Assignee:
            Unassigned Unassigned
            Reporter:
            divoxx divoxx
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None