• K
    Make table properties shareable · 161ab42a
    kailiu 提交于
    Summary:
    We are going to expose properties of all tables to end users through "some" db interface.
    However, current design doesn't naturally fit for this need, which is because:
    
    1. If a table presents in table cache, we cannot simply return the reference to its table properties, because the table may be destroy after compaction (and we don't want to hold the ref of the version).
    2. Copy table properties is OK, but it's slow.
    
    Thus in this diff, I change the table reader's interface to return a shared pointer (for const table properties), instead a const refernce.
    
    Test Plan: `make check` passed
    
    Reviewers: haobo, sdong, dhruba
    
    Reviewed By: haobo
    
    CC: leveldb
    
    Differential Revision: https://reviews.facebook.net/D15999
    161ab42a
table_reader.h 3.0 KB