-
Notifications
You must be signed in to change notification settings - Fork 60
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
TRT-1338: WIP: Potential replacement for the remaining 35 minute matview: Test analysis by job #2074
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dgoodwin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Did you try any bigger batch sizes? These rows are small, I bet you could insert 50K at once |
I tried 10k and quickly ran into that parameter size problem we always used to see on postgres. I'll test 5 or so. |
Oh ok, probably not a huge deal, we can just let it run over a weekend for the initial seeding |
Down to 17m per day by wrapping the whole creation in one transaction instead of many smaller ones. This would only be for one fetchdata per day once we cross the 8am UTC threshold. |
How do we feel about the general approach? I've got it loading up a weeks worth of data to prod now, if we like it I can try to seed 2 months manually letting it run for approx 18 hours. |
I've loaded up a week of data in prod db in 2 hours. I then setup testview to do the variant query against this new table and it still returns immediately. I suspect this approach will let us chart much longer. |
@dgoodwin: This pull request references TRT-1338 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Added a couple new commits that import one day at a time transactionally, and autocreate partitions for each day. Then will test how queries perform with this in place, hopefully we can do our standard 2 week query and allow the user to select longer ranges and wait if desired, as we discussed. Creation of the partition table is manual, I'll have to figure that out before this can go in. CREATE TABLE test_analysis_by_job_by_dates (
date timestamp with time zone,
test_id bigint,
release text,
job_name text,
test_name text,
runs bigint,
passes bigint,
flakes bigint,
failures bigint
) PARTITION BY RANGE (date);
CREATE UNIQUE INDEX test_release_date
ON test_analysis_by_job_by_dates (date, test_id, release, job_name);
|
First test, oct 29 - nov 14, 11s with no caching. |
@dgoodwin: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
In an attempt to ultimately allow the test details page to show more history than 2 weeks, I went after the last slow matview. The theory was we were wasting time recalculating past days that no longer change. I wanted to replace it with a daily summary, calculated by bigquery, stored in a permanent postgresql table.
This is implemented here, the problem is that the insert for a single day is 25 minutes (about 1.5 million rows a day), vs the 35 minutes for 14 days prior. Inserting is very slow.
On a day by day basis, we could probably live with that, there would just be a many hour initial load (we could immediately go back as far as we want). We should then be able to go further back with the charts.
However it is slow even for a day at a time.
Alternatively, with this query implemented, we could just live query from bigquery for that API and begin mixing bigquery into sippy classic. We'd just need to filter down to the jobs sippy knows about. (A variant could actually be helpful there)