Skip to content
  • Levi Tamasi's avatar
    Make sure (Shared)BlobFileMetaData are owned by shared_ptrs (#6749) · bc51e33d
    Levi Tamasi authored
    Summary:
    The patch makes a couple of small cleanups to `SharedBlobFileMetaData` and `BlobFileMetaData`:
    * It makes the constructors private and introduces factory methods to ensure these objects are always owned by `shared_ptr`s. Note that `SharedBlobFileMetaData` has an additional factory that takes a deleter object; we can utilize this to e.g. notify `VersionSet` when a blob file becomes obsolete (which is exactly when `SharedBlobFileMetaData` is destroyed).
    * It disables move operations explicitly instead of relying on them being suppressed because of a user-declared destructor.
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/6749
    
    Test Plan: `make check`
    
    Reviewed By: riversand963
    
    Differential Revision: D21206947
    
    Pulled By: ltamasi
    
    fbshipit-source-id: 9094c14cc335b3e226f883e5a0df4f87a5cdeb95
    bc51e33d