Remove opData object in MongoDB ops #165

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

bfirsh commented Jan 23, 2013

See #160

Contributor

wmertens commented Jan 23, 2013

@zamfi happy with this?

Contributor

wmertens commented Feb 28, 2013

Actually the loop doesn't need to create that result array. The docs array is already there and all that needs to be done is to remove the _id on all the docs.

In fact, I don't think there's an issue with the _id being in the returned doc at all (I might be wrong). How about just returning the docs array?

Contributor

bfirsh commented Feb 28, 2013

I did it that way just to make backwards compatibility simple. I suppose it could iterate over docs and remove opData if it exists. Or, of course, we could write a migration script.

Contributor

wmertens commented Feb 28, 2013

A migration script might actually be the best, since even if you don't run it the future operations are fine and the snapshots are right where they're supposed to be. There won't be a performance hit on read then.

Contributor

bfirsh commented Feb 28, 2013

That sounds sensible. What about ops that haven't been snapshotted yet, though?

Perhaps we could do two steps: first, release it with backwards compatibility and the small performance hit alongside a migration script. Then, in the next version, we remove backwards compatibility.

Contributor

wmertens commented Feb 28, 2013

Deal! 👍

Contributor

bfirsh commented Apr 12, 2013

There we go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment