• R
    Added "number of merge operands" to statistics in ssts. · f6e404c2
    Richard Cairns Jr 提交于
    Summary:
    A couple of notes from the diff:
      - The namespace block I added at the top of table_properties_collector.cc was in reaction to an issue i was having with PutVarint64 and reusing the "val" string.  I'm not sure this is the cleanest way of doing this, but abstracting this out at least results in the correct behavior.
      - I chose "rocksdb.merge.operands" as the property name.  I am open to suggestions for better names.
      - The change to sst_dump_tool.cc seems a bit inelegant to me.  Is there a better way to do the if-else block?
    
    Test Plan:
    I added a test case in table_properties_collector_test.cc.  It adds two merge operands and checks to make sure that both of them are reflected by GetMergeOperands.  It also checks to make sure the wasPropertyPresent bool is properly set in the method.
    
    Running both of these tests should pass:
    ./table_properties_collector_test
    ./sst_dump_test
    
    Reviewers: IslamAbdelRahman
    
    Reviewed By: IslamAbdelRahman
    
    Subscribers: andrewkr, dhruba
    
    Differential Revision: https://reviews.facebook.net/D58119
    f6e404c2
table_properties_collector_test.cc 17.9 KB