facebookarchive / flashback

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

Handle generic binary values in replay log #9

Closed bdeeney closed 9 years ago

bdeeney commented 9 years ago

Proposed fix for #8

tredman commented 9 years ago

Thanks for the PR. I think this will work, i.e. allow the insert/update to occur, but this is going to change the field type from binary to string.

What do you think about using the bson.Binary type? http://godoc.org/gopkg.in/mgo.v2/bson#Binary

I think we could just copy the $binary and $type fields directly into this struct, avoiding the special case logic for 'obj["$type"] == "00"'. Also, we should cover this behavior in this test: https://github.com/ParsePlatform/flashback/blob/master/replay/src/replay/ops_reader_test.go#L150

tredman commented 9 years ago

Conversion of special types should be fixed now. Please see https://github.com/ParsePlatform/flashback/issues/11

bdeeney commented 9 years ago

Travis: Thanks for pursuing this through to an elegant and comprehensive solution (#11). We very much appreciate you continuing to maintain and improve such a useful software tool.