-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(ext/kv): send queue wake messages accross different kv instances #20465
Conversation
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.
This still doesn't handle the case where a message is enqueued in one process but the listener is in another process?
I think a better solution would be to periodically (with a very low frequency) wake up the queue listener even if there are no locally-enqueued messages.
Correct, this doesn't take care of cross-process enqueue/dequeue. I propose to handle that in a separate PR, either through a periodic wake-up, or using some cross-process channel (e.g. fs). |
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
…20465) fixes #20454 Current KV queues implementation assumes that `enqueue` and `listenQueue` are called on the same instance of `Deno.Kv`. It's possible that the same Deno process opens multiple KV instances pointing to the same fs path, and in that case `listenQueue` should still get notified of messages enqueued through a different KV instance.
fixes #20454
Current KV queues implementation assumes that
enqueue
andlistenQueue
are called on the same instance ofDeno.Kv
. It's possible that the same Deno process opens multiple KV instances pointing to the same fs path, and in that caselistenQueue
should still get notified of messages enqueued through a different KV instance.