|
When running a command inserting a batch of time-series documents resulting in multiple buckets, multiple oplog entries will be generated. With {ordered: true} option, currently the field "prevOpTime" in each oplog entry will be set to the same zero timestamp instead of the timestamp of the previous operation.
In the test when setting the command with {ordered: true}, the oplog entries in donorPrimary.getDB("local").oplog.rs look like
{
|
"lsid" : {
|
"id" : UUID("ff76a7f5-239c-4c67-a6ef-d6930899ef5a"),
|
"uid" : BinData(0,"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=")
|
},
|
"txnNumber" : NumberLong(0),
|
"op" : "i",
|
...,
|
"ts" : Timestamp(1619470064, 5),
|
...,
|
"stmtId" : [
|
0,
|
1,
|
2
|
],
|
"prevOpTime" : {
|
"ts" : Timestamp(0, 0),
|
"t" : NumberLong(-1)
|
}
|
},
|
{
|
"lsid" : {
|
"id" : UUID("ff76a7f5-239c-4c67-a6ef-d6930899ef5a"),
|
"uid" : BinData(0,"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=")
|
},
|
"txnNumber" : NumberLong(0),
|
"op" : "u",
|
...,
|
"ts" : Timestamp(1619470064, 6),
|
...,
|
"stmtId" : [
|
3,
|
4,
|
5
|
],
|
"prevOpTime" : {
|
"ts" : Timestamp(0, 0),
|
"t" : NumberLong(-1)
|
}
|
},
|
The field "prevOpTime" in the second oplog entry should be the field "ts" in the first oplog entry.
|