Skip to content

[MOD-18996] Transfer allocation accounting between allocators - #1120

Merged
GuyAv46 merged 2 commits into
8.8-rsefrom
guy/mod-18996-release-allocator
Nov 12, 2026
Merged

GuyAv46 merged 2 commits into
8.8-rsefrom
guy/mod-18996-release-allocator

Conversation

@GuyAv46

@GuyAv46 GuyAv46 commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Backport allocator transfer from #1115 onto the VecSim revision pinned by Search 8.8-rse. Also cherry-pick upstream Ubuntu 26.04 install support (#1111), required because ubuntu-latest moved to 26.04.

The three allocator tests pass locally under ASan/UBSan with leak checking. CI is rerunning after the setup fix.


Note

Medium Risk
Changes VecSim memory accounting semantics; misuse (wrong deleter or concurrent transfers) could skew usage stats or double-free, though behavior is covered by new unit tests.

Overview
Adds VecSimAllocator::transferAllocationTo so an existing allocation's byte accounting can move from one allocator instance to another without reallocating or freeing the block—supporting scenarios like tiered indexes swapping ownership across layers.

The API no-ops on null or self-transfers, documents that callers must fix any owning deleter before freeing via the destination, and notes that the two counters are updated non-atomically. Unit tests cover balanced accounting, alignment/payload preservation, edge cases, and verify no extra malloc/free traffic on transfer.

Also adds .install/ubuntu_26.04.sh, installing clang-format-18 from the Ubuntu archive and symlinking clang-format for format checks where LLVM's apt repo lacks 26.04 packages, plus the usual build dependencies.

Reviewed by Cursor Bugbot for commit 15ce4fb. Bugbot is set up for automated code reviews on this repo. Configure here.

Add Ubuntu 26.04 install script for the new ubuntu-latest runner

GitHub's ubuntu-latest image moved to Ubuntu 26.04, and install_script.sh
failed with "ubuntu_26.04.sh: No such file or directory".

apt.llvm.org has no LLVM 18 repo for 26.04 (resolute), so install
clang-format-18 from the Ubuntu archive and point the unversioned
clang-format used by check-format.sh at it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@GuyAv46
GuyAv46 merged commit 0392204 into 8.8-rse Nov 12, 2026
12 checks passed
@GuyAv46
GuyAv46 deleted the guy/mod-18996-release-allocator branch November 12, 2026 16:07
@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.58%. Comparing base (fcdeb37) to head (15ce4fb).
⚠️ Report is 1 commits behind head on 8.8-rse.

Additional details and impacted files
@@             Coverage Diff             @@
##           8.8-rse    #1120      +/-   ##
===========================================
+ Coverage    97.55%   97.58%   +0.02%     
===========================================
  Files          142      142              
  Lines         9095     9102       +7     
===========================================
+ Hits          8873     8882       +9     
+ Misses         222      220       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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