Skip to content

Instantly share code, notes, and snippets.

@danared
Created April 2, 2015 21:59
Show Gist options
  • Save danared/4eee4f225adbfeb9f898 to your computer and use it in GitHub Desktop.
Save danared/4eee4f225adbfeb9f898 to your computer and use it in GitHub Desktop.
$ mongo --port 27021
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:27021/test
shard02:PRIMARY> db.mycollection.find()
{ "_id" : 1, "data" : "hello" }
{ "_id" : 3, "data" : "hello" }
{ "_id" : 5, "data" : "hello" }
shard02:PRIMARY> use local
switched to db local
shard02:PRIMARY> db.oplog.rs.find().pretty()
{
"ts" : Timestamp(1422998531, 1),
"h" : NumberLong(0),
"v" : 2,
"op" : "n",
"ns" : "",
"o" : {
"msg" : "initiating set"
}
}
{
"ts" : Timestamp(1422998890, 1),
"h" : NumberLong("-6780991630754185199"),
"v" : 2,
"op" : "i",
"ns" : "test.system.indexes",
"fromMigrate" : true,
"o" : {
"v" : 1,
"key" : {
"_id" : 1
},
"name" : "_id_",
"ns" : "test.mycollection"
}
}
{
"ts" : Timestamp(1422998890, 2),
"h" : NumberLong("-165956952201849851"),
"v" : 2,
"op" : "i",
"ns" : "test.mycollection",
"fromMigrate" : true,
"o" : {
"_id" : 1,
"data" : "hello"
}
}
{
"ts" : Timestamp(1422998890, 3),
"h" : NumberLong("-7432242710082771022"),
"v" : 2,
"op" : "i",
"ns" : "test.mycollection",
"fromMigrate" : true,
"o" : {
"_id" : 3,
"data" : "hello"
}
}
{
"ts" : Timestamp(1422998890, 4),
"h" : NumberLong("6790671206092100026"),
"v" : 2,
"op" : "i",
"ns" : "test.mycollection",
"fromMigrate" : true,
"o" : {
"_id" : 5,
"data" : "hello"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment