mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5778] [CLOSED] fix(node): avoid full inbound reconcile after client edits #5985
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5985
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5778
Author: @rqzbeh
Created: 7/3/2026
Status: ❌ Closed
Base:
main← Head:fix/node-client-noop-reconcile📝 Commits (2)
aab8d90fix(node): avoid redundant client-edit reconciles68687d6fix(node): resolve correctness gaps in client-edit reconciles📊 Changes
6 files changed (+254 additions, -2 deletions)
View changed files
📝
internal/web/runtime/reconcile_skip_test.go(+116 -0)📝
internal/web/runtime/remote.go(+14 -0)📝
internal/web/service/bulk_clients_test.go(+9 -1)📝
internal/web/service/client_bulk.go(+4 -0)📝
internal/web/service/client_inbound_apply.go(+36 -1)📝
internal/web/service/node_bulk_dispatch_test.go(+75 -0)📄 Description
Summary
Avoids remote-node full inbound reconciles caused by client edits, especially no-op client saves.
UpdateInboundClientnow preserves the existing clientupdated_atand returns before any DB write, runtime RPC, or node dirty mark when the effective settings did not change.panel/api/inbounds/update/:idwhen the node already has the same wire payload.Why
Closes #5764.
Closes #5771.
Saving an unchanged client used to stamp a fresh
updated_at, mark the remote node dirty, then let the 5s node sync send a full inbound update. On the node that full update removes/re-adds the Xray inbound handler, which matches the reported traffic stop while the Xray process still appears running.Type of change
Areas affected
How was this tested?
go test ./internal/web/service ./internal/web/runtime -run 'TestNodeUpdateInboundClient(NoopSkipsRuntimeAndDirty|LivePushKeepsDirtyBackup)$|TestRemotePerClientMutationsSeedReconcileFingerprint$|TestReconcileInbound_SkipsUnchanged$' -count=1go test ./internal/web/service ./internal/web/runtime -count=1go test ./...go test -shuffle=on -count=1 ./...go test -race -shuffle=on -count=1 ./...go test -run '^$' -fuzz 'FuzzParseLink$' -fuzztime=30s ./internal/util/link/go test -run '^$' -fuzz 'FuzzDecodeCertPin$' -fuzztime=30s ./internal/web/runtime/go build ./...golangci-lint rungo run golang.org/x/vuln/cmd/govulncheck@latest ./...cd frontend && npm ci && npm run lint && npm run typecheck && npm test && npm run build && npm audit --audit-level=highgit diff --checkScreenshots / recordings
N/A — backend-only change.
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass. (No frontend changes; ran anyway.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.