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

fix(linked chunk): fix order handling of initial chunks in UpdateToVectorDiff::new #4437

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Dec 18, 2024

The code would use a chunk iterator that moves forward, but call push_front() repetitively on each chunk, semantically storing the lengths in reverse order.

This could result in subsequent panics, when a new chunk was added, because the links would not match what's expected (e.g. the last chunk must have no successor, etc.).

Part of #3280.

…ectorDiff::new()`

The code would use a chunk iterator that moves forward, but call
`push_front()` repetitively on each chunk, semantically storing the
lengths in *reverse* order.

This could result in subsequent panics, when a new chunk was added,
because the links would not match what's expected (e.g. the last chunk
must have no successor, etc.).
@bnjbvr bnjbvr requested a review from a team as a code owner December 18, 2024 16:42
@bnjbvr bnjbvr requested review from andybalaam and removed request for a team December 18, 2024 16:42
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.40%. Comparing base (ff7077b) to head (0ea0a5d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4437   +/-   ##
=======================================
  Coverage   85.40%   85.40%           
=======================================
  Files         283      283           
  Lines       31490    31490           
=======================================
+ Hits        26893    26894    +1     
+ Misses       4597     4596    -1     

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

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Of course!! Thanks for spotting this bug.

@Hywan Hywan merged commit de56883 into main Dec 18, 2024
40 checks passed
@Hywan Hywan deleted the bnjbvr/fix-as-vector-with-initial-items branch December 18, 2024 18:50
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.

2 participants