m3
m3 copied to clipboard
[dbnode] Fix setting of Head/Tail finalize flags for Segment
What this PR does / why we need it:
In some cases Segment.Flags was being set to FinalizeHead&FinalizeTail which was clearly not intended because this expression results in 0 with the consequence of neither Head nor Tail being finalized during Segment.Finalize(). Fixed by changing the expression to FinalizeHead|FinalizeTail which results in finalizing both Head and Tail.
Special notes for your reviewer:
Somewhat worried that introducing finalization where it belongs might cause a double finalize in case there was some other code finalizing Segment.Head or Segment.Tail. Inspecting via IDE did not reveal any such cases directly.
Does this PR introduce a user-facing and/or backwards incompatible change?: NONE
Does this PR require updating code package or user-facing documentation?: NONE
Codecov Report
Merging #2648 (1ae14df) into master (6e56231) will increase coverage by
14.4%. The diff coverage is100.0%.
:exclamation: Current head 1ae14df differs from pull request most recent head ef3e68e. Consider uploading reports for the commit ef3e68e to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #2648 +/- ##
=========================================
+ Coverage 57.3% 71.7% +14.4%
=========================================
Files 553 1086 +533
Lines 63161 96909 +33748
=========================================
+ Hits 36227 69566 +33339
+ Misses 23729 22650 -1079
- Partials 3205 4693 +1488
| Flag | Coverage Δ | |
|---|---|---|
| aggregator | 76.0% <ø> (+13.4%) |
:arrow_up: |
| cluster | 85.0% <ø> (∅) |
|
| collector | 82.8% <ø> (?) |
|
| dbnode | 79.3% <100.0%> (+17.8%) |
:arrow_up: |
| m3em | 74.4% <ø> (+27.9%) |
:arrow_up: |
| m3ninx | 72.2% <ø> (?) |
|
| m3nsch | 51.1% <ø> (?) |
|
| metrics | 17.2% <ø> (-2.4%) |
:arrow_down: |
| msg | 73.7% <ø> (-0.8%) |
:arrow_down: |
| query | 68.0% <ø> (?) |
|
| x | 80.8% <ø> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 6e56231...ef3e68e. Read the comment docs.