Skip to content

Conversation

@nic-6443
Copy link
Member

@nic-6443 nic-6443 commented Dec 25, 2024

Description

The current deepcopy, when it finds that the original table has already been copied, will directly use the original table. This causes the copied table and the original table to share one table, which does not conform to the semantics of deepcopy. After fixing, the same table will be copied only once by default, we also allow specifying special fields to use shallow copy because, for the health checker module, we need to mount the checker corresponding to the upstream into the original route table so that old checker objects can be released when routes are updated or deleted.

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 (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Dec 25, 2024
f
Signed-off-by: Nic <[email protected]>
Signed-off-by: Nic <[email protected]>
@nic-6443 nic-6443 merged commit 3e5e0eb into apache:master Dec 26, 2024
30 checks passed
@nic-6443 nic-6443 deleted the nic/fix-deep-copy branch December 26, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants