9 Commits

Author SHA1 Message Date
7c3fc2f261 Revert "Unistore : Ensure Watch works in HA mode." (#94097)
Revert "Unistore : Ensure Watch works in HA mode. (#93428)"

This reverts commit 0a26c9e9aec15ba0d21a836e1cbc1b03bad4bc34.
2024-10-01 18:45:47 +00:00
0a26c9e9ae Unistore : Ensure Watch works in HA mode. (#93428)
* Replace Watch with WatchNext

* remove watchset

* fix previous page and closing the channel

* Remove the broadcaster cache to prevent dupplicated events

* add watch bookmark

* add watch bookmark

* cleanup comments

* disable the tests for bookmarks for now

* Ensure we send previosu events

* lint

* re-introduce the cache

* load from cache

* disabling legacy test

* disabling legacy test

* Update pkg/storage/unified/resource/server.go

Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>

* Could not read previous events

* add proper migration

* Add previous_resource_version to both history and resource

* First event should have an RV of 2 and not 1

* Test both storage backends

* fix the inital RV for the sql backend

* ensure graceful stop of the stream decoder

* gocyclo

---------

Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
2024-09-30 13:14:07 +02:00
5a30e12a10 SQLTemplate: Make Ident only work for identifiers (not any string) (#92387) 2024-08-27 13:22:40 +03:00
f432a1713b SQLTemplate: Swap the IFace with the concrete struct (#92008) 2024-08-16 15:12:37 +03:00
d9cabe5e14 SQL: Add sql template test helper (#91953) 2024-08-16 14:36:56 +03:00
f804b0baa3 Storage: Return an iterator from backend List (#91185) 2024-07-31 12:05:59 +03:00
e4ed000d05 ResourceStore: Fix sql List (#91043)
* fix resource list

* ensure we get the resource version without FOR SHARE
2024-07-26 13:56:24 +02:00
399d77a0fd Resource server improvements and fixes (#90715)
* cleanup dependencies and improve list method
* Improve Resource Server API, remove unnecessary dependencies
* Reduce the API footprint of ResourceDBInterface and its implementation
* Improve LifecycleHooks to use context
* Improve testing
* reduce API size and improve code
* sqltemplate: add DialectForDriver func and improve naming
* improve lifecycle API
* many small fixes after adding more tests
2024-07-22 20:08:30 +03:00
08c611c68b ResourceServer: Resource store sql backend (#90170) 2024-07-18 08:03:18 -07:00