facebookarchive / flashback

Capture and replay real mongodb workloads
Other
217 stars 72 forks source link

normalizeObj in replay not fully working #23

Closed dbmurphy closed 9 years ago

dbmurphy commented 9 years ago
Before normalizeObj:  map[ntoreturn:10000 query:map[$hint:map[_id:1] $query:map[ag_id:map[$oid:5433f7254d32daa1e3000198] _id:map[$in:[map[$oid:547af4cf62194fd252005d9a]]] $and:[map[up.pu_at:<nil> pt.t:map[$ne:<nil>]]]]] ns:XXXX.users op:query ntoskip:0 ts:map[$date:1.431009423378e+12]]
After nomralizeObj:  map[ts:2015-05-07 07:37:03.378 -0700 PDT ntoreturn:10000 query:map[$hint:map[_id:1] $query:map[ag_id:ObjectIdHex("5433f7254d32daa1e3000198") _id:map[$in:[map[$oid:547af4cf62194fd252005d9a]]] $and:[map[up.pu_at:<nil> pt.t:map[$ne:<nil>]]]]] ns:XXXX.users op:query ntoskip:0]

As you can see it is not parsing inside $or , $in and other operators. My thoughts are rather than just a type switch it needs to be a type switch or where the value starts with $ it needs to cast it?

I honestly feel very week at golang, so I could be off base but I am seeing this with $and, $or, and $in type operators.

dbmurphy commented 9 years ago

Never-mind, realized this was an old pre the move to the mongo-tools library causing this.