Repository navigation
[k2] implement shared-memory confdata - #1685
Merged
Merged
Conversation
apolyakov
force-pushed
the
apolyakov/k2-confdata-support
branch
from
September 1, 2026 15:13
edfd3c1 to
554f2e6
Compare
apolyakov
force-pushed
the
apolyakov/k2-confdata-support
branch
2 times, most recently
from
September 10, 2026 16:15
abe987f to
abecc07
Compare
apolyakov
requested review from
DrDet,
LLirikkkk,
PetrShumilov and
denisichh
September 11, 2026 14:16
apolyakov
marked this pull request as ready for review
September 11, 2026 14:16
denisichh
requested changes
Sep 13, 2026
apolyakov
force-pushed
the
apolyakov/k2-confdata-support
branch
from
September 15, 2026 14:32
c0dbeb5 to
6d62872
Compare
apolyakov
force-pushed
the
apolyakov/k2-confdata-support
branch
from
September 15, 2026 16:02
6d62872 to
4f72dcf
Compare
denisichh
approved these changes
Sep 23, 2026
PetrShumilov
requested changes
Sep 23, 2026
| // The generated shared-memory name and internally acquired sample ID must be valid. | ||
| // Failure here is an internal invariant violation, not a recoverable client error. | ||
| kphp::log::assertion(lease.has_value()); | ||
| if (const auto written{co_await connection->get_stream().write_all(std::as_bytes(std::span{std::addressof(*lease), 1}))}; !written) [[unlikely]] { |
Contributor
There was a problem hiding this comment.
Need to reorder write_all and register_abort_handler.
If register_abort_handler fails, lease will be destroyed, but write_all has already replied to the KPHP instance that everything is OK. This can leave the instance with access to a shared-memory segment that has already been released. Potential segfault
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement
kphp-confdata.soto synchronize snapshots and incremental updates fromconfdata-proxyand expose shared-memory data to PHP instances.Add wildcard lookups, reader leases that preserve snapshots across piece rotation, memory-budget checks, and capacity metrics. Include the component in build and installation targets.