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

May remove blob storage too early #95

Open
Connor1996 opened this issue Oct 12, 2019 · 0 comments
Open

May remove blob storage too early #95

Connor1996 opened this issue Oct 12, 2019 · 0 comments
Labels
status/discussion Status: Under discussion or need discussion type/bug Type: Issue - Confirmed a bug

Comments

@Connor1996
Copy link
Member

Connor1996 commented Oct 12, 2019

When calling DestroyColumnFamilyHandle we may remove related blob storage directly.
But if there are multiples column family handles, Titan removes related blob storage on the first time to call DestroyColumnFamilyHandle, so using other non-destroyed column family handles to get will encounter blob-storage-not-found.

TitanDB::Open(db_options, dbname_, descs, &cf_handles_, &db_));

// ... put some data

std::vector<ColumnFamilyHandle*> cf_handles_tmp;
for (auto& handle : cf_handles_) {
    cf_handles_tmp.push_back(db_impl_->GetColumnFamilyHandleUnlocked(handle->GetID()));
 }

// ... get some data. Success!

for (auto& handle : cf_handles_tmp) {
    ASSERT_TRUE(handle);
    db_->DestroyColumnFamilyHandle(handle);
 }

// ... get some data. Fail!

But it's okay for normal usage, cause GetColumnFamilyHandleUnlocked can't be called exteriorly.

@Connor1996 Connor1996 added the bug label Oct 12, 2019
@yiwu-arbug yiwu-arbug removed the bug label Dec 21, 2019
@yiwu-arbug yiwu-arbug added status/discussion Status: Under discussion or need discussion type/bug Type: Issue - Confirmed a bug labels Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/discussion Status: Under discussion or need discussion type/bug Type: Issue - Confirmed a bug
Projects
None yet
Development

No branches or pull requests

2 participants