perf(clients): batch client creation by destination node

Group compatible committed adds into the existing multi-inbound request. Keep lane ordering, preserve target-specific payloads, and bound remote delivery across the create so unavailable nodes can converge through reconciliation.
This commit is contained in:
Hamed Sanaei
2026-12-02 20:08:47 +03:30
parent 32e4b8bcfe
commit da015758c0
11 changed files with 610 additions and 45 deletions
+1 -1
View File
@@ -269,7 +269,7 @@ func (a *ClientController) create(c *gin.Context) {
return
}
clientSvc := a.clientService.TrackNodeApplies()
needRestart, err := clientSvc.Create(&a.inboundService, &payload)
needRestart, err := clientSvc.CreateWithContext(c.Request.Context(), &a.inboundService, &payload)
// Flagged before the error check: a partly-applied create leaves clients
// committed on the inbounds that succeeded, and those still need the restart.
if needRestart {