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

Add protection for concurrent access to m_down_buffers #577

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

koujl
Copy link
Contributor

@koujl koujl commented Nov 1, 2024

Issue: #578

The down_buf has the real_up_buf (the meta buf) as its up_buffer, but cannot be found in the read_up_buf->m_down_buffers. The inconsistency is caused by unprotected concurrent writes to the vector m_down_buffers.

Add a mutex lock to IndexBuffer as well as extracting add/remove operations into member functions to make the vector thread-safe.

@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 85.71429% with 5 lines in your changes missing coverage. Please review.

Project coverage is 67.30%. Comparing base (1a0cef8) to head (76fc41a).
Report is 84 commits behind head on master.

Files with missing lines Patch % Lines
src/lib/index/index_service.cpp 87.50% 1 Missing and 2 partials ⚠️
src/lib/index/index_cp.cpp 75.00% 0 Missing and 1 partial ⚠️
src/lib/index/wb_cache.cpp 85.71% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #577       +/-   ##
===========================================
+ Coverage   56.51%   67.30%   +10.79%     
===========================================
  Files         108      109        +1     
  Lines       10300    10654      +354     
  Branches     1402     1454       +52     
===========================================
+ Hits         5821     7171     +1350     
+ Misses       3894     2787     -1107     
- Partials      585      696      +111     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@zhiteng zhiteng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR message should be put into commit message as well with some modification, which the reference to eBay internal JIRA isn't suitable for public github.com hosted open source project. My suggestion is to create an issue and refer to that issue instead of JIRA. That way people from outside of eBay may see the entirety of whole issue along with this fix.

@koujl
Copy link
Contributor Author

koujl commented Nov 4, 2024

Linked to #578

Copy link
Contributor

@shosseinimotlagh shosseinimotlagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!
Todo: needs to change to set

@koujl koujl merged commit 804cd6b into eBay:master Nov 5, 2024
21 checks passed
@koujl koujl deleted the m_dbuf_fix branch November 5, 2024 07:09
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.

4 participants