feat: increment route update for radixtree host uri, radixtree uri and radi…#9692
feat: increment route update for radixtree host uri, radixtree uri and radi…#9692ranxuxin001 wants to merge 23 commits into
Conversation
…xtree uri with parameter
| if apisix_router.need_create_radixtree then | ||
| uri_router = base_router.create_radixtree_uri_router(routes, uri_routes, false) | ||
| apisix_router.need_create_radixtree = false | ||
| for k, _ in pairs(sync_tb) do |
There was a problem hiding this comment.
Use require("table.clear") instead?
| if route and route.value then | ||
| local status = table.try_read_attr(route, "value", "status") | ||
| if status and status == 0 then | ||
| return |
There was a problem hiding this comment.
continue the loop? You could use goto statement.
| end | ||
| end | ||
|
|
||
| sync_tb[k] = nil |
There was a problem hiding this comment.
clear the whole table after the loop?
| sync_tb[k] = nil | ||
| end | ||
|
|
||
| apisix_router.sync_tb = sync_tb |
There was a problem hiding this comment.
no need to reassign the table? because they point to the same table.
| return | ||
| end | ||
|
|
||
| _M.sync_tb = sync_tb |
There was a problem hiding this comment.
remove this statement, and ditto.
| local uri_routes = {} | ||
| local uri_router | ||
| local match_opts = {} | ||
| local function incremental_operate_radixtree(routes) |
There was a problem hiding this comment.
We should put this function in radixtree_uri.lua or elsewhere and reuse it here, instead of redefine? They are the same except for the no_param_match.
| if #routes == 0 then | ||
| host_routes[k] = nil | ||
| if op then | ||
| core.log.error("###################del####", k) |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions. |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions. |
|
ping @ranxuxin001 |
|
ping @ranxuxin001 |
|
@ranxuxin001 are you available to work on this? We understand that you will be having other things to work for. In case you're not available to work on this, please mention it so that someone else can take this issue up! Thank you again for contributing to apisix! |
hi @nitishfy , my colleague can no longer work on this issue. plz find someone else to handle it. |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions. |
|
This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
|
Perhaps this pull request should be reconsidered for reopening. I believe it could be highly beneficial for environments where the route configuration frequently changes. |
|
@Revolyssup Could you please reopen this issue? The problem still persists and seems serious. While there is a potential workaround with this patch: #12466, an official fix from the project would be much appreciated. |
@Baoyuantop Please take a look |
|
Hi @sergey-jr, thanks for your feedback, I reopened it. |
|
Since the original author is no longer able to work on this PR, anyone is welcome to resubmit. |
|
Hi @ranxuxin001, following up on the previous review comments. Let us know if you have an update. Thanks! |
|
@Baoyuantop Hi! I open new MR #12826 for this issue |
|
Due to a lack of activity, this PR is closed for now. We will continue working on this issue in #12826. Thank you for your contribution @ranxuxin001 . |
This PR extends apisix to modify a route without create the whole radixtree everytime.
refer to #9334