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

db:mongoid:create_indexes task is not safe

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.1.5
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Tested on Mongoid 3.1.4.

      Currently all the indexes with the create_indexes task are create without the safe: true option. This means that, whenever my unique index fails to create because of the duplicate keys error, I see in the create_indexes logs, that the index was created, and I'm never going to know that there's in fact no index.

      So I believe, that the create_indexes task has to create indexes with the safe: true option, or we can pass the safety value as an option to the task, or we can add the create_indexes_safely task.

            Assignee:
            Unassigned Unassigned
            Reporter:
            exoth Yuriy Trofimenko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: