-
Notifications
You must be signed in to change notification settings - Fork 23
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
[spec] Update saved query to be async #202
base: main
Are you sure you want to change the base?
Conversation
We fix our spec changes so that a query can be queued to reused if it is not the initial query but it is received before the initial query is resolved. Previously, only fully resolved queries were being treated as saved.
@xyaoinum and @wanderview Please take a look, thanks! |
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.
Thanks! Have one question about the behavior for when the first selectURL() is rejected.
Two more questions on budget charging:
|
You're correct; there were some bugs in my logic that I've now fixed. First, i forgot to return |promise| and abort in the case that we already had a saved index available (I implied that this is what I wanted done but didn't mention it explicitly.) Second, I was still charging the budgets, as you noted. Now I will use a tuple with a boolean to keep track of whether or not to charge the budgets.
This issue I don't quite follow. Why do we need to charge budget in the rejection case? Won't the charge be 0 bits? What did I miss? |
LGTM % the rejection case question
If we don't charge the budget for reject, then if selectURL() happens to return 0, it could instead trigger an error to achieve the desired outcome without incurring budget costs. This issue was previously addressed in the code: https://crrev.com/c/3846383 (which seems to occur before we had the spec) |
I had forgotten that we had done that. Thanks for reminding me. I will fix the rejection case now in the spec. |
@xyaoinum Please take another look, as I think I fixed the rejection bug. Thanks! |
We fix our spec changes so that a query can be queued to reused if it is not the initial query but it is received before the initial query is resolved.
Previously in the spec, only fully resolved queries were being treated as saved. This was an oversight.
Preview | Diff