fix(embed): join startup workers and preserve service failures - #28656
Open
XuPeng-SH wants to merge 2 commits into
Open
fix(embed): join startup workers and preserve service failures#28656XuPeng-SH wants to merge 2 commits into
XuPeng-SH wants to merge 2 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
force-pushed
the
fix/embed-startup-diagnostics
branch
from
September 11, 2026 03:05
89cc564 to
490e0ff
Compare
XuPeng-SH
force-pushed
the
fix/embed-startup-diagnostics
branch
from
September 11, 2026 04:32
490e0ff to
12e7513
Compare
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.
What type of PR is this?
Which issue(s) this PR fixes:
Related: #28646
What this PR does / why we need it:
Embedded cluster startup can launch CN workers concurrently, but the previous implementation stored heterogeneous startup errors in one
atomic.Value. Different concrete error types can panic while being stored, and a synchronous LOG/TN failure could return while an already-launched CN worker was still starting. That lets rollback overlap startup and hides the original failure.The startup path now owns one error slot per service, joins every launched CN worker before returning, keeps errors in service configuration order, preserves
errors.Is/errors.As, and stops scheduling services after a synchronous infrastructure failure. The fix applies to initial and incremental startup. The regression tests use the existingstartFnseam, so they do not start real services or add sleeps.The error wrapper uses MatrixOne's typed internal error to satisfy the repository SCA contract. The concurrent-error oracle has been updated to assert the resulting diagnostic while retaining the cause and ordering checks.
Validation
TestDoStartLockedConcurrentErrors:-race -count=100, passed (1.192s).TestDoStartLockedJoinsCNBeforeReturningInfrastructureFailure:-race -count=100, passed (1.194s).pkg/embednormal: passed (49.268s).pkg/embedrace: passed (55.684s).go vet ./pkg/embed/...: passed.golangci-lint --new-from-rev origin/main ./pkg/embed/...: 0 issues.git diff --check: passed.The tests were run from the rebased candidate worktree at main
ee0c2bf563bf27ff2c80891bb57a1de5886bf90bwith a freshly built CPU CGo/native dependency set. The first vet attempt hit a full/tmpbefore analysis; it was rerun with disk-backed temporary storage and passed.