Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monotonic atomic counters for sequential ordering #95

Open
scullxbones opened this issue Feb 13, 2016 · 1 comment
Open

Add monotonic atomic counters for sequential ordering #95

scullxbones opened this issue Feb 13, 2016 · 1 comment

Comments

@scullxbones
Copy link
Owner

  • Use atomic findAndModify with counters per:
    • Global
    • Tag (when implemented)
  • Migrate existing data to add global counter
  • On append, grab batch via {$inc: N} and inject each into Atom
  • Think about indexing
@filosganga
Copy link
Contributor

@scullxbones I am not a MongoDB expert, my assumption was that a simple timestamp field on each Atom should be enough.

Even if the MongoDB documentation reads:

If you insert a document containing an empty BSON timestamp in a top-level field, the MongoDB server will replace that empty timestamp with the current timestamp value

I have no idea how you can insert an empty BSONTimestamp using Casbah or rxMongo.

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

No branches or pull requests

2 participants