AlinsRan commented on PR #13757: URL: https://github.com/apache/apisix/pull/13757#issuecomment-5118692685
Closing this — after review it does not hold up, and I'd rather withdraw it than waste maintainer time. I originally framed it as a hot-path perf win, but `merge_consumer_route` is wrapped in an lrucache (`merged_route`, keyed by route+consumer+conf_version), so the deep copy only runs on cache miss, not per request — the perf benefit is negligible. Its real origin was a bugfix: a downstream healthcheck implementation keyed a checker on the plugin-conf object identity, so deep-copying `value.plugins` in `merge_consumer_route` produced a fresh object every time and made the checker rebuild. But that healthcheck path has since been refactored to key on stable identifiers (resource key / version / target ip:port:hostname) instead of conf identity, so the deep copy no longer triggers any rebuild. With neither the perf nor the correctness rationale standing, `opts.shallow_prefix` is just added API surface with a shared-reference footgun and no real benefit. Sorry for the noise. -- 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]
