m3 icon indicating copy to clipboard operation
m3 copied to clipboard

[dbnode] Fix setting of Head/Tail finalize flags for Segment

Open linasm opened this issue 5 years ago • 1 comments

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

linasm avatar Sep 20 '20 18:09 linasm

Codecov Report

Merging #2648 (1ae14df) into master (6e56231) will increase coverage by 14.4%. The diff coverage is 100.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

Impacted file tree graph

@@            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 data Powered by Codecov. Last update 6e56231...ef3e68e. Read the comment docs.

codecov[bot] avatar Sep 11 '23 10:09 codecov[bot]