Skip to content
  • sdong's avatar
    PlainTableReader to support non-mmap mode · df34aea3
    sdong authored
    Summary:
    PlainTableReader now only allows mmap-mode. Add the support to non-mmap mode for more flexibility.
    Refactor the codes to move all logic of reading data to PlainTableKeyDecoder, and consolidate the calls to Read() call and ReadVarint32() call. Implement the calls for both of mmap and non-mmap case seperately. For non-mmap mode, make copy of keys in several places when we need to move the buffer after reading the keys.
    
    Test Plan: Add the mode of non-mmap case in plain_table_db_test. Run it in valgrind mode too.
    
    Subscribers: leveldb, dhruba
    
    Differential Revision: https://reviews.facebook.net/D47187
    df34aea3