-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: add warning for data plane writing to etcd #12241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
apisix/core/etcd.lua
Outdated
|
||
|
||
|
||
local function block_write_if_data_plane() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block is not a good name in here. block is often used to indicate IO blocking, such as: blocking io
and non-blocking io
. block_write
has a significant ambiguity with the actual function of this function. It is recommended to change it to disable
, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
When APISIX is running as a data plane, if any ETCD write operations are performed through
core.etcd
related functions or CLI, warning logs will be printed without blocking the write operations. This functionality will be deprecated in future versions, after which write operations will no longer be allowed.Mailing list: https://lists.apache.org/thread/gfsooqm4cz6cx2sh7htmqgwlml5kggm2
Scope of Impact
ETCD Write Operations Using core.etcd Related Functions
Example usage:
Based on the analysis of the
apisix/core/etcd.lua
file, the following functions can perform ETCD write operations:For these functions, warning logs will be printed to inform users that this functionality will be deprecated in future versions, after which write operations will no longer be allowed.
ETCD Write Operations Using CLI Created by core.etcd.new()
Example usage:
After exporting the CLI, referring to the https://github.com/api7/lua-resty-etcd/blob/master/lib/resty/etcd/v3.lua file, the following operations perform ETCD write operations:
For these functions, warning logs will be printed to inform users that this functionality will be deprecated in future versions, after which write operations will no longer be allowed.
Timeline
If there are no strong objections on the mailing list, the plan is as follows:
Checklist