-
Notifications
You must be signed in to change notification settings - Fork 11
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
Run all creative mode templates simultaneously / fix and adjust record-counting for queries and template execution #824
Comments
See PRs |
Note: It's likely that the current code for this PR will conflict with #825 because the code here aborts all subqueries when the time cap is reached. However, it is unclear how to handle this when the subqueries are in a queue seperate from the thread (and all subqueries from different queries are merged into one queue). |
Regarding integrating with #825, in that case we don't want to abort subqueries because we'd prefer them to keep running and cache results whether those results are being used immediately or not. So, if a template adds subqueries to the queue, and then the template execution is aborted, we'd want those subqueries to keep running -- it increases the chances the template will complete before timeout in subsequent queries to BTE. |
This being the case, after you've verified #825 performs well under high traffic, you might want to rebase branches addressing #825 to branches for this issue, so you can seamlessly merge the behavior of the two issues. Normally we wouldn't do this, but because both are very involved changes that will be going up simultaneously (and theoretically support one another, performance-wise), it makes sense to do so. |
@rjawesome please update PRs to merge in Pathfinder behavior from main (currently has a merge conflict, may require extra changes) |
@tokebe done. |
Fixes/logging-improvements were deployed to CI using commits to main branches:
Related: changed per-query/per-template record max. Functionally increased max from 50k to 75k. |
After discussing urgent timeout / "large response" problems with @tokebe, we decided on the following quick-changes to this feature (not extensively tested):
Note: large response maybe related to duplicated edge-attribute sets #891, but not sure. We can walk some of these changes back later after figuring out they're okay. |
Commits:
|
Related changes deployed to Prod as of 11/13 |
As a likely improved alternative to #808, we should instead try running all templates simultaneously.
This slightly complicates response merging, but race conditions should be solvable with a per-query execution lock.
More importantly, we still don't want to go over time, so we want to time out at about 4:55 to ensure there's time to finish up and make callbacks/store the response. This might be both on individual templates and on the entire handler.
After implementation, we'll want some performance testing to ensure this doesn't create unreasonable strain on memory/CPU.
The text was updated successfully, but these errors were encountered: