-
Notifications
You must be signed in to change notification settings - Fork 98
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
fix: break from retry loop when key is not found #1535
Conversation
Signed-off-by: Yashash H L <yashashhl25@gmail.com>
Signed-off-by: Yashash H L <yashashhl25@gmail.com>
pkg/shared/kvs/jetstream/kv_store.go
Outdated
} | ||
} | ||
if value.Created().After(lastUpdate) { | ||
lastUpdate = value.Created() | ||
} | ||
} | ||
|
||
_ = keyLister.Stop() |
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.
will we end up in double stopping because KeyLister closes stop if all is read?
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.
Shall we use defer
?
value, err = jss.kv.Get(key) | ||
for err != nil { | ||
// keys can be deleted when the previous vertex pod is deleted/restarted. | ||
if errors.Is(err, nats.ErrKeyNotFound) { |
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.
let's add a Info statement here.
Signed-off-by: Yashash H L <yashashhl25@gmail.com>
Signed-off-by: Yashash H L <yashashhl25@gmail.com>
Signed-off-by: Yashash H L <yashashhl25@gmail.com> Co-authored-by: Vigith Maurice <vigith@gmail.com>
Closes #1540
Closes #1536