-
Notifications
You must be signed in to change notification settings - Fork 276
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
Paginate redis scan pages properly and don't use Notify anymore for entity caching #5925
Conversation
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@bnjjj, please consider creating a changeset entry in |
let (handle, _b) = notify.create_or_subscribe(InvalidationTopic, false).await?; | ||
|
||
let h = handle.clone(); | ||
let (tx, rx) = tokio::sync::mpsc::channel(128); |
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 128?
I think this now acts as an informal concurrency limit on the number of in-flight invalidation requests. That's probably desirable, but we should think carefully about the exact number we want and maybe also consider documenting it.
We should make it a global const
and use the const in the tests and give it a really good name that explains what it's doing.
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 just wanted to keep the same configuration than in Notify https://github.com/apollographql/router/blob/bnjjj/fix_redis_scan/apollo-router/src/notification.rs#L33:L33 the previous impl we used. But I think it should be 1024 that's the other const I have to take. I'll create a new const for this
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
…r into bnjjj/fix_redis_scan
Calling https://docs.rs/fred/latest/fred/types/trait.Scanner.html#tymethod.next everytime.
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩