Closed qsyqian closed 2 months ago
It seems like a valid request.
It was added in https://github.com/etcd-io/etcd/pull/5492 more than 8 years ago.
Actually the Range
was also following the same pattern in the first place, but was changed to use linearizableReadNotify
later.
Agree request is valid, serving Auth reads by waiting for read index should improve performance of operations, my only concerns are:
One specific technical concern is that etcd supports MVCC for key space, but not for other buckets, i.e. Auth. Processing Auth read requests (i.e. UserGet, RoleGet, etc.) via raft can guarantee linearizability although it may lead to unnecessary backend queries.
Indeed, we haven't received any complaint on the Auth performance yet. Also K8s doesn't enable auth at all.
So we might not want to make any change for Auth for now.
Thanks for the confirm. Agree with your comments that we do not make any change for Auth now. Maybe we can do this if we meet some performance issue for Auth later. Thx again.
Close this issue, if anyone has any questions, please feel free to reopen it.
Bug report criteria
What happened?
I found that read operations related to auth directly use raftRequest to transfer the operation to backend. So if request to one etcd member, all the members will do query from the backend. eg:
I think we should change this func to this. First, request one readIndex from leader, then do query with store.
So, only the member which receive the request will do query from backend.
Anyone who can double check this, please let me know if i am wrong.
What did you expect to happen?
Please see description above.
How can we reproduce it (as minimally and precisely as possible)?
N/A
Anything else we need to know?
Nothing.
Etcd version (please run commands below)
3.6.0-alpha.0
Etcd configuration (command line flags or environment variables)
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
No response