Skip to content

Conversation

bzp2010
Copy link
Collaborator

@bzp2010 bzp2010 commented Aug 26, 2025

Description

We have implemented single-batch synchronization for multiple servers on the apisix-standalone backend. Consequently, the final synchronization result will pertain to all servers collectively, and currently, no field indicates which server succeeded or failed.

This PR adds an optional server field to the synchronization result and populates it in the apisix-standalone backend.

{
  "status": "partial_failure",
  "total_resources": 4,
  "success_count": 2,
  "failed_count": 2,
  "success": [
    {
      "server": "http://127.0.0.1:29180",
      "event": {},
      "synced_at": "2025-08-26T10:45:20.000Z"
    },
    {
      "server": "http://127.0.0.1:19180",
      "event": {},
      "synced_at": "2025-08-26T10:45:20.000Z"
    }
  ],
  "failed": [
    {
      "server": "http://invalid.host:19180",
      "event": {},
      "failed_at": "2025-08-26T10:45:20.623Z",
      "reason": "getaddrinfo ENOTFOUND invalid.host"
    },
    {
      "server": "http://invalid.host:29180",
      "event": {},
      "failed_at": "2025-08-26T10:45:20.623Z",
      "reason": "getaddrinfo ENOTFOUND invalid.host"
    }
  ]
}

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible

@bzp2010 bzp2010 marked this pull request as ready for review August 26, 2025 11:25
@bzp2010 bzp2010 added the test/apisix-standalone Trigger the APISIX standalone test on the PR label Aug 26, 2025
@bzp2010 bzp2010 merged commit 3fe939d into main Aug 26, 2025
64 of 69 checks passed
@bzp2010 bzp2010 deleted the bzp/feat-bas-sync-result-server-field branch August 26, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test/apisix-standalone Trigger the APISIX standalone test on the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants