• S
    In DB::NewIterator(), try to allocate the whole iterator tree in an arena · df9069d2
    sdong 提交于
    Summary:
    In this patch, try to allocate the whole iterator tree starting from DBIter from an arena
    1. ArenaWrappedDBIter is created when serves as the entry point of an iterator tree, with an arena in it.
    2. Add an option to create iterator from arena for following iterators: DBIter, MergingIterator, MemtableIterator, all mem table's iterators, all table reader's iterators and two level iterator.
    3. MergeIteratorBuilder is created to incrementally build the tree of internal iterators. It is passed to mem table list and version set and add iterators to it.
    
    Limitations:
    (1) Only DB::NewIterator() without tailing uses the arena. Other cases, including readonly DB and compactions are still from malloc
    (2) Two level iterator itself is allocated in arena, but not iterators inside it.
    
    Test Plan: make all check
    
    Reviewers: ljin, haobo
    
    Reviewed By: haobo
    
    Subscribers: leveldb, dhruba, yhchiang, igor
    
    Differential Revision: https://reviews.facebook.net/D18513
    df9069d2
merger.cc 9.6 KB