Skip to content
  • sdong's avatar
    plain table reader: non-mmap mode to keep two recent buffers · 9a8e3f73
    sdong authored
    Summary: In plain table reader's non-mmap mode, we only keep the most recent read buffer. However, for binary search, it is likely we come back to a location to read. To avoid one pread in such a case, we keep two read buffers. It should cover most of the cases.
    
    Test Plan:
    1. run tests
    2. check the optimization works through strace when running
    ./table_reader_bench -mmap_read=false --num_keys2=1 -num_keys1=5000 -table_factory=plain_table --iterator --through_db
    
    Reviewers: anthony, rven, kradhakrishnan, igor, yhchiang, IslamAbdelRahman
    
    Reviewed By: IslamAbdelRahman
    
    Subscribers: leveldb, dhruba
    
    Differential Revision: https://reviews.facebook.net/D51171
    9a8e3f73