diff options
author | James E. Blair <jim@acmegating.com> | 2023-03-13 14:48:41 -0700 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2023-03-13 14:57:29 -0700 |
commit | 84c0420792a1ac6c3205b9b7282e800c1d8623d0 (patch) | |
tree | e006b69cbe0b84e45e81877f5d8381eaf67e7872 /zuul/sphinx | |
parent | 0d35927e2c0a010aae92b8f08997b036c318d55a (diff) | |
download | zuul-84c0420792a1ac6c3205b9b7282e800c1d8623d0.tar.gz |
Add statement timeouts to some web sql queries
The SQL queries are designed to be highly optimized and should return
in milliseconds even with millions of rows. However, sometimes
query planners are misled by certain characteristics and can end
up performing suboptimally.
To protect the web server in case that happens, set a statement or
query timeout for the queries which list builds or buildsets. This
will instruct mysql or postgresql to limit execution of the buildset
or build listing queries to 30 seconds -- but only if these queries
originate in zuul-web. Other users (such as the admin tools) may
still run these queries without an explicit time limit (though the
server may still have one).
Unfortunately (or perhaps fortunately) the RDBMSs can occasionally
satisfy the queries we use in testing in less than 1ms, making a
functional test of this feature impractical (we are unable to set
the timeout to 0ms).
Change-Id: If2f01b33dc679ab7cf952a4fbf095a1f3b6e4faf
Diffstat (limited to 'zuul/sphinx')
0 files changed, 0 insertions, 0 deletions