20183: Clean up sql queries.
authorTom Clegg <tom@curii.com>
Thu, 9 Mar 2023 21:38:59 +0000 (16:38 -0500)
committerTom Clegg <tom@curii.com>
Thu, 9 Mar 2023 21:38:59 +0000 (16:38 -0500)
commit869497eff961e5d2951e84e8b46d81bbc1d3ec3b
tree8924bb71017ea975e7743c1401f73dc0fe041e81
parentdcb3df6be978eef367e0d4fda95ccd71e0281749
20183: Clean up sql queries.

Remove "container_requests.uuid IS NOT NULL" (this is a tautology in
an inner join)

Use same "state=Committed" condition in Rails and controller
query. This is already implied by the "containers.state in (Queued,
Locked, Running)" condition since only a Committed request should
reference such a container. However, if the distinction ever comes
up (race?  manual database update?) we would want to skip the
non-Committed requests, so this serves as cheap insurance.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
lib/controller/localdb/container.go
services/api/app/models/container.rb