kingluo commented on code in PR #9692:
URL: https://github.com/apache/apisix/pull/9692#discussion_r1252568957
##########
apisix/http/router/radixtree_uri.lua:
##########
@@ -18,24 +18,128 @@ local require = require
local core = require("apisix.core")
local base_router = require("apisix.http.route")
local get_services = require("apisix.http.service").services
+local apisix_router = require("apisix.router")
+local json = require("apisix.core.json")
+local table = require("apisix.core.table")
local cached_router_version
local cached_service_version
+local uri_routes = {}
+local uri_router
+local match_opts = {}
local _M = {version = 0.2}
- local uri_routes = {}
- local uri_router
- local match_opts = {}
+local function incremental_operate_radixtree(routes)
+ local sync_tb = apisix_router.sync_tb
+ 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
Review Comment:
Use require("table.clear") instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]