mirror of
https://github.com/rancher/steve.git
synced 2025-09-03 16:35:25 +00:00
vai: Rework events garbage collection delete query (#682)
This commit is contained in:
committed by
GitHub
parent
6495e7879c
commit
952305e096
@@ -98,9 +98,10 @@ const (
|
|||||||
WHERE rv = ?
|
WHERE rv = ?
|
||||||
`
|
`
|
||||||
deleteEventsByCountFmt = `DELETE FROM "%s_events"
|
deleteEventsByCountFmt = `DELETE FROM "%s_events"
|
||||||
WHERE rowid
|
WHERE rowid < (
|
||||||
NOT IN (
|
SELECT MIN(rowid) FROM (
|
||||||
SELECT rowid FROM "%s_events" ORDER BY rowid DESC LIMIT ?
|
SELECT rowid FROM "%s_events" ORDER BY rowid DESC LIMIT ?
|
||||||
|
) q
|
||||||
)`
|
)`
|
||||||
|
|
||||||
createFieldsTableFmt = `CREATE TABLE "%s_fields" (
|
createFieldsTableFmt = `CREATE TABLE "%s_fields" (
|
||||||
|
@@ -348,8 +348,6 @@ func TestNewListOptionIndexerEasy(t *testing.T) {
|
|||||||
partitions []partition.Partition
|
partitions []partition.Partition
|
||||||
ns string
|
ns string
|
||||||
|
|
||||||
items []*unstructured.Unstructured
|
|
||||||
|
|
||||||
extraIndexedFields [][]string
|
extraIndexedFields [][]string
|
||||||
expectedList *unstructured.UnstructuredList
|
expectedList *unstructured.UnstructuredList
|
||||||
expectedTotal int
|
expectedTotal int
|
||||||
|
Reference in New Issue
Block a user