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

Segfault/Assertion error in DBImplReadOnly::GetImpl when calling GetMergeOperands #13243

Open
chengji77 opened this issue Dec 22, 2024 · 2 comments

Comments

@chengji77
Copy link

Expected behavior

GetMergeOperands should work when DB is opened in read only mode.

Actual behavior

Segfault in DBImplReadOnly::GetImpl when build in release mode.

When compiled using debug mode, this assert failed:

assert(get_impl_options.value != nullptr ||

Steps to reproduce the behavior

RocksDB v9.7.4
Open a db in read only mode and call db->GetMergeOperands

It might be a regression when adding wide column support. We had an older build using v8.6.7 and there was no crash.

@ltamasi
Copy link
Contributor

ltamasi commented Jan 26, 2025

This seems related to #11799 - cc @jaykorean

@jaykorean
Copy link
Contributor

jaykorean commented Jan 27, 2025

Thanks for the heads up @ltamasi and @chengji77 . I will take a look.

facebook-github-bot pushed a commit that referenced this issue Jan 29, 2025
Summary:
Fixing the GetMergeOperands() in ReadOnlyDB and SecondaryDB as reported in #13243. Refactor in #11799 introduced this regression.

Follow ups to come
- Large Result Optimization (done in #10458 ) for ReadOnlyDB and SecondaryDB
- Stress Test / Crash Test coverage
- Consider removing some duplicate logic between ReadOnlyDB's GetImpl() and SecondaryDB's `GetImpl()`. The only difference is between acquiring/referencing Superversion.

Pull Request resolved: #13340

Test Plan:
`DBMergeOperandTest` and `DBSecondaryTest` updated

```
./db_merge_operand_test --gtest_filter="*GetMergeOperandsBasic*"
```
```
./db_secondary_test -- --gtest_filter="*GetMergeOperands*"
```

Reviewed By: ltamasi

Differential Revision: D68791652

Pulled By: jaykorean

fbshipit-source-id: 760925e257ab10993c207094718dc0659822ae64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants