Closed wojcikstefan closed 8 years ago
Similarly, a query with sub-document also has this problem:
In the system.profile, an entry like this:
{
"op" : "update",
"ns" : "ceairdb.invSegInfo",
"query" : {
"flightInfo" : {
"carrier" : "MU",
"flightNo" : "9179",
"oriEng" : "PVG",
"desEng" : "CGQ",
"flightDt" : ISODate("2016-02-05T16:00:00Z")
}
},
"updateobj" : { }
}
When replayed, the query looked like this:
{
"flightInfo" : {
"oriEng" : "YNT",
"flightNo" : "549",
"desEng" : "ICN",
"carrier" : "MU",
"flightDt" : ISODate("2016-01-06T16:00:00Z")
}
}
As a result, the replay fails for every query that uses a sub document.
This should be fixed thoroughly by https://github.com/ParsePlatform/flashback/pull/35 - please open a new issue if you are still experiencing problems with ordering. Note that you will need to re-record any previous sessions to take advantage of the fix, since the record output file format has changed.
Since a JS object preserves order of the keys while Python and Go don't, we need to make sure that the keys in
$hint
and$orderby
are in the right order.Right now for example, an operation in the profile collection can look like this:
... and is recorded as:
... and when you try to replay it, MongoDB returns: