Skip to content

Add shared memory segment store - #2

Merged
samuel-williams-shopify merged 6 commits into
mainfrom
move-segment-allocator
Aug 21, 2026
Merged

Add shared memory segment store#2
samuel-williams-shopify merged 6 commits into
mainfrom
move-segment-allocator

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Async::Utilization::SegmentStore for storing, reusing, growing, and reading schema-backed shared memory segments
  • expose path-based resource acquisition through SegmentStore.open
  • keep initialize focused on acquired resources and store-internal state
  • validate configuration before replacement and clean up partially acquired resources on failure
  • support block-form opening with automatic close
  • document coordinated store/observer usage and add an unreleased note

This moves the shared-memory ownership and reader-side primitive next to Async::Utilization::Observer, allowing supervisor integrations to depend on a reusable utilization abstraction.

Verification

  • bundle exec bake test (50 tests, 139 assertions)
  • bundle exec rubocop (236 files, no offenses)
  • bundle exec bake decode:index:coverage lib (39/39 public definitions)
  • COVERAGE=PartialSummary bundle exec bake test (229/229 lines, 100% coverage)

MRI 3.3, 3.4, 4.0, and head checks previously passed on Linux/macOS. The allowed-to-fail JRuby and TruffleRuby jobs retain the existing IO::Buffer mapping failures also present on main.

Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
@samuel-williams-shopify samuel-williams-shopify changed the title Add shared memory segment allocator Add shared memory segment store Aug 20, 2026
@samuel-williams-shopify
samuel-williams-shopify merged commit 2d121e8 into main Aug 21, 2026
36 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the move-segment-allocator branch August 21, 2026 00:01
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.

1 participant