phoenixwebgroup / DotNetMongoMigrations

Migrations for Mongo using the official csharp (dotnet) driver
Other
59 stars 34 forks source link

For some reason the Migration is called twice! #19

Open efstathios-chatzikyriakidis opened 8 years ago

efstathios-chatzikyriakidis commented 8 years ago

I am facing the following problem: The migration is called twice!

Here is my code: http://pastebin.com/wAPHrW8j

Please help.

g0t4 commented 8 years ago

If a doc is changed drastically, it can move around on disk and then be returned by a cursor a second time.

You can either write an idempotent migration or open your own cursor and use snapshotting: https://docs.mongodb.org/manual/core/read-isolation-consistency-recency/ (pay heed to the warnings listed)

On Thu, Mar 24, 2016 at 8:09 AM, EfstathiosChatzikyriakidis < notifications@github.com> wrote:

I am facing the following problem: The migration is called twice!

Here is my code: http://pastebin.com/wAPHrW8j

Please help.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/phoenixwebgroup/DotNetMongoMigrations/issues/19