mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #7038] [MERGED] fix(sync): preserve shared client lifecycle across nodes #6591
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#6591
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/7038
Author: @SeyedHashtag
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @MHSanaei
Base:
main← Head:codex/fix-node-client-lifecycle📝 Commits (1)
5b8d857fix(sync): preserve shared client lifecycle across nodes📊 Changes
4 files changed (+217 additions, -7 deletions)
View changed files
📝
internal/nodee2e/harness_test.go(+17 -0)📝
internal/nodee2e/node_sync_test.go(+51 -0)📝
internal/web/service/inbound_node.go(+14 -7)➕
internal/web/service/node_shared_lifecycle_test.go(+135 -0)📄 Description
Clients attached to multiple nodes share one traffic row, whose inbound may belong to a different node. Node synchronization currently consults a node-scoped map for lifecycle decisions, allowing a stale enabled/disabled state to overwrite the shared client record and adopted settings. It can also miss a renewal reported by a sibling node.
Use the existing batched global per-email traffic lookup for lifecycle merging, adopted settings, and client-record synchronization. Include clients reported only in settings, while retaining node-scoped maps for membership and cleanup.
Regression coverage uses disposable synthetic databases and loopback panels. It covers alternating node snapshots, preservation of master blocks, settings without traffic statistics, sibling-node renewals, and convergence across multiple synchronization cycles under both admin and node-sync tokens.
Validation:
make verifypassed in Linux with Go 1.27.3 and Node 26, including all Go/frontend tests, lint, generated-file checks, builds, and docs schema consistency.The full Windows gate encounters an existing public-IP test deadlock, reproduced on unmodified upstream; the Linux gate passes without exclusions.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
[PR #7038] fix(sync): preserve shared client lifecycle across nodesto [PR #7038] [MERGED] fix(sync): preserve shared client lifecycle across nodes