[TODO] used if there is a concurrency issues between gc and flush#661
[TODO] used if there is a concurrency issues between gc and flush#661Besroy wants to merge 1 commit into
Conversation
In previous implementation, there may be a concurrency issue between 'permanent_destroy' and 'cp_flush/flush_durable_commit_lsn': if m_rd_sb is destroyed at T1 then is written at T2, a NPE will occur. This pr is a fix way to avoid this issue by adding m_sb_mtx for destroy.
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #661 +/- ##
==========================================
+ Coverage 56.51% 66.18% +9.67%
==========================================
Files 108 109 +1
Lines 10300 11288 +988
Branches 1402 1539 +137
==========================================
+ Hits 5821 7471 +1650
+ Misses 3894 3091 -803
- Partials 585 726 +141 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
thanks for the effort to refine the edge case. |
|
@Besroy can you check if this was fixed or do we still need this? |
We still need this, but I haven't encountered this corner case. Let me close this PR and reopen it if it occurs again |
In previous implementation, there may be a concurrency issue between 'permanent_destroy' and 'cp_flush/flush_durable_commit_lsn': if m_rd_sb is destroyed at T1 then is written at T2, a NPE will occur.
This pr is a fix way to avoid this issue by adding m_sb_mtx for destroy.
In addition to the current fix, there are two other potential approaches to address this issue: