Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store BlobStorage pointer in ColumnFamilyHandle #294

Closed
Connor1996 opened this issue Dec 6, 2023 · 0 comments
Closed

Store BlobStorage pointer in ColumnFamilyHandle #294

Connor1996 opened this issue Dec 6, 2023 · 0 comments
Assignees
Labels
type/enhancement Type: Issue - Enhancement

Comments

@Connor1996
Copy link
Member

rocksdb embed cfd pointer in ColumnFamilyHandleImpl. One of the benefit is, with the handle, a read doesn't need to acquire db_mutex to obtain cfd pointer. Similarly, we can embed BlobStorage pointer in the handle to save mutex lock to obtain BlobStorage pointer. We can define TitanColumnFamilyHandle as following and return it to caller. The struct is safe to be used as rocksdb::ColumnFamilyHandle when calling rocksdb methods.

struct TitanColumnFamilyHandle : public rocksdb::ColumnFamilyHandleImpl {
    std::shared_ptr<BlobStorage> blob_storage;
};

Part of #139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: Issue - Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants