Don't use transaction in ListModifiedSince. (#110392)

* Don't use transaction in ListModifiedSince.

To guarantee that we don't include events with RV > LatestRV, we include the check in SQL query instead.

* Fix integration test by converting SQL comments into template comments.
This commit is contained in:
Peter Štibraný
2025-09-01 11:39:02 +02:00
committed by GitHub
parent 31114fb47c
commit da43e2ae07
7 changed files with 20 additions and 42 deletions
@@ -10,5 +10,6 @@ FROM resource_history
WHERE {{.Ident "namespace" }} = {{.Arg .Namespace }}
AND {{.Ident "group" }} = {{.Arg .Group }}
AND {{.Ident "resource" }} = {{.Arg .Resource }}
AND {{.Ident "resource_version" }} > {{.Arg .SinceRv }} -- needs to be exclusive of the sinceRv
AND {{.Ident "resource_version" }} > {{.Arg .SinceRv }} {{/* needs to exclude SinceRv */}}
AND {{.Ident "resource_version" }} <= {{.Arg .LatestRv }} {{/* needs to include LatestRv */}}
ORDER BY {{.Ident "name" }} ASC, {{.Ident "resource_version" }} DESC