Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Handle applyOps somehow? #13

Open
nelhage opened this issue Sep 3, 2014 · 0 comments
Open

Handle applyOps somehow? #13

nelhage opened this issue Sep 3, 2014 · 0 comments

Comments

@nelhage
Copy link
Contributor

nelhage commented Sep 3, 2014

Mongo's applyOps command generates weird oplog entries. We should consider transparently supporting those somehow, or, at a minimum, Streamer should support them:

nelhage:PRIMARY> db.getSiblingDB('admin').runCommand({applyOps: [{
... "ts" : {
... "t" : 1409704895,
... "i" : 2
... },
... "h" : NumberLong("1547919913461096899"),
... "v" : 2,
... "op" : "i",
... "ns" : "nelhage.nelhage",
... "o" : {
... "_id" : ObjectId("540663be6f3242b06b9c3101"),
... "i" : 2
... }
... }]})
{ "applied" : 1, "results" : [ true ], "ok" : 1 }
nelhage:PRIMARY> db.oplog.rs.find().sort({$natural:-1}).limit(1).next()
{
    "ts" : {
        "t" : 1409704955,
        "i" : 1
    },
    "h" : NumberLong("8371608664109460151"),
    "v" : 2,
    "op" : "c",
    "ns" : "admin.$cmd",
    "o" : {
        "applyOps" : [
            {
                "ts" : {
                    "t" : 1409704895,
                    "i" : 2
                },
                "h" : NumberLong("1547919913461096899"),
                "v" : 2,
                "op" : "i",
                "ns" : "nelhage.nelhage",
                "o" : {
                    "_id" : ObjectId("540663be6f3242b06b9c3101"),
                    "i" : 2
                }
            }
        ]
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant