-
Notifications
You must be signed in to change notification settings - Fork 39.2k
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
etcd3/store: watcher implementation #23694
Conversation
go func() { | ||
for _, kv := range getResp.Kvs { | ||
wc.sendEvent(&event{ | ||
key: string(kv.Key), |
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.
can we use parseEvent for this too?
Let me take a look into it later - I have a full calendar while being in US, but hopefully will take a first pass on it later today (or in the worst case, tomorrow). |
GCE e2e build/test passed for commit 3e9950c0071a32683dfa7ba9193573a54b7787bf. |
Will look tomorrow. |
GCE e2e build/test passed for commit c58a63e28d91ef2d896d8fc04d3345b258edf7d4. |
/cc @kubernetes/huawei |
GCE e2e build/test passed for commit 729bd2fc34770b023e9a8a674a4167e24215f53a. |
d48e827
to
04882ca
Compare
Test failed because of data race. See etcd-io/etcd#4876 I will have to bump up godep again. |
GCE e2e build/test failed for commit 04882ca2e576c0c19f9d39d14752751a453b1bfe. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
GCE e2e build/test passed for commit dadab986b46aa516c69a1257e5dc4927c60e3af5. |
GCE e2e build/test passed for commit fafda38e3c0e6b0978efa283deae394dc6fad9f4. |
GCE e2e build/test failed for commit 61fe10bcfe0fd89c9dcae93ddfa0c41568d2b44e. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
GCE e2e build/test passed for commit acf2db98f008c83af71714b343525f97b5dadda0. |
GCE e2e build/test passed for commit c421d9632816dbbc999a80fc9c80662d9495736c. |
key: string(etcdEvent.Kv.Key), | ||
value: etcdEvent.Kv.Value, | ||
rev: etcdEvent.Kv.ModRevision, | ||
isDeleted: etcdEvent.Type == storagepb.DELETE || etcdEvent.Type == storagepb.EXPIRE, |
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.
I would almost think this abstraction could be in the client library.. same with the one below.
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.
Can you clarify?
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.
Ah, I see what you mean.
I'm considering adding it to etcd library too. I will try to coordinate with the etcd team on this.
GCE e2e build/test passed for commit a69c15e0cf5fd7565a6648ce57ff07f09e897436. |
Automatic merge from submit-queue Bump up etcd dependency to fix data race ref: #23694 What this PR does - Bumping up the godep of etcd to fix data race in etcd watcher. Without this change, watcher PR builds will fail in race detection. - Small changes to fix builds after upgrade
Rebased. |
GCE e2e build/test passed for commit 23571315d351d7a0d71d400d9eff0a2cad47f910. |
GCE e2e build/test passed for commit 78788cecd95bfa4a27777cece9245f903ffff1b0. |
GCE e2e build/test passed for commit b98ce67c528de4ea6c14043ba3be9eb4f8fa2440. |
GCE e2e build/test passed for commit 2dbd2d2685e65cbff26e280353ddc49f46c29a15. |
var errResult *watch.Event | ||
select { | ||
case err := <-wc.errChan: | ||
errResult = parseError(err) |
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.
why not just wc.resultChan <- *parseError(err)
and get rid of errResult completely?
Just some very minor nit. Other than that LGTM |
@wojtek-t Thanks for the review. Addressed and squashed. |
LGTM - thanks! |
GCE e2e build/test passed for commit e18b4e6. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit e18b4e6. |
Automatic merge from submit-queue |
ref: #22448
This PR does: