[INPROGRESS] First version of tokumx converter

This pull request aims to add tokumx support to mongoriver by converting tokumx oplog records to mongo oplog records.

cc @ebroder 
I think there are more cases where we're not adding all the information -
e.g. on updates we're not passing in the pk field. Perhaps add the original
hash as an argument?

On Tue, Aug 26, 2014 at 2:21 PM, Evan Broder <notifications@github.com>
wrote:

> In lib/mongoriver/toku.rb:
>
> > +        "ns" => operation["ns"],
> > +        # operation being done.
> > +        # e.g. {"_id"=>BSON::ObjectId('53fb8f6b9e126b2106000003')}
> > +        "o" => operation["o"]
> > +      }
> > +    end
> > +
> > +    def self.remove_record(operation, full_record)
> > +      {
> > +        "ts" => timestamp(full_record),
> > +        "h" => full_record["h"],
> > +        # "v" => 1,
> > +        "op" => "d",
> > +        "ns" => operation["ns"],
> > +        # "b" => true, # TODO: ???
> > +        "o" => { "_id" => operation["o"]["_id"] }
>
> Hmm. The o field in Toku is the full object pre-image right?
>
> I wonder if it makes sense to just emit that full hash. You can certainly
> imagine cases where that would be useful to have access to, and something
> you might want to code your application against if you knew you were
> pure-Toku. It seems sad to lose that information in the interests of
> unified interface, since a generic application will only look at
> op['o']['_id'] anyway.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/stripe/mongoriver/pull/11/files#r16743419>.
>