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

gh-1850 fix nil-pointer in segment cursor #1859

Merged
merged 1 commit into from Mar 14, 2022

Conversation

etiennedi
Copy link
Member

There was a small data race where a compaction could have already
occurred/finished between creating the array and initializing it, thus
leaving empty slots.

There is no test yet, as this will be tested through the stress-test
pipelines together with a potential fix for #1849

fixes #1850

Test for this will be added to the stress-testing pipeline.

There was a small data race where a compaction could have already
occurred/finished between creating the array and initializing it, thus
leaving empty slots.

There is no test yet, as this will be tested through the stress-test
pipelines together with a potential fix for #1849
@codecov
Copy link

codecov bot commented Mar 14, 2022

Codecov Report

Merging #1859 (77156e6) into master (01a8262) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1859      +/-   ##
==========================================
+ Coverage   66.06%   66.12%   +0.05%     
==========================================
  Files         411      411              
  Lines       30915    30931      +16     
==========================================
+ Hits        20425    20454      +29     
+ Misses       8691     8678      -13     
  Partials     1799     1799              
Flag Coverage Δ
integration 67.42% <100.00%> (+0.14%) ⬆️
unittests 66.12% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
adapters/repos/db/lsmkv/cursor_segment_replace.go 85.96% <100.00%> (ø)
adapters/repos/db/vector/hnsw/insert.go 74.02% <0.00%> (-1.65%) ⬇️
adapters/repos/db/lsmkv/memtable.go 75.00% <0.00%> (-0.17%) ⬇️
adapters/repos/db/lsmkv/binary_search_tree.go 100.00% <0.00%> (ø)
...dapters/repos/db/lsmkv/segment_group_compaction.go 67.71% <0.00%> (+0.78%) ⬆️
usecases/sharding/state.go 66.99% <0.00%> (+0.97%) ⬆️
adapters/repos/db/shard_write_batch_objects.go 77.27% <0.00%> (+1.51%) ⬆️
adapters/repos/db/lsmkv/bucket.go 64.98% <0.00%> (+2.29%) ⬆️
adapters/repos/db/lsmkv/binary_search_tree_map.go 100.00% <0.00%> (+2.70%) ⬆️
adapters/repos/db/lsmkv/bucket_options.go 70.96% <0.00%> (+4.30%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 877688d...77156e6. Read the comment docs.

@etiennedi etiennedi merged commit 31fc0d8 into master Mar 14, 2022
@etiennedi etiennedi deleted the bugfix/gh-1849-gh-1850-replace-segfault branch March 14, 2022 12:23
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

Successfully merging this pull request may close these issues.

Bug: Race-like situation leads to nil-pointer panic in replace cursor
1 participant