19 Commits

Author SHA1 Message Date
f2bd367f61 fix: keep dual writer mode in sync with kv store (#106692) 2025-06-20 08:37:20 +02:00
ebf3a8d205 fix: make data syncer run configurable on mode (2->3) change (#104401) 2025-04-25 13:43:35 +02:00
58457d41d3 K8s/DualWriter: Remove legacy interface (#101395) 2025-02-27 13:27:28 +03:00
2e82ac0cc1 Unistore: keep current dual writing mode when unable to run data syncer at bootstrap (#100852)
* Unistore: keep current dual writing mode when unable to run data syncer at bootstrap

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-02-20 17:43:36 -03:00
aca024bcbb fix(unified-storage): use dedicated mocks per storage type (#100389) 2025-02-12 09:59:21 +01:00
1509fadd5b refactor(unified-storage): make datasyncer configurable (#97832) 2024-12-12 21:41:01 +01:00
a1de4cc5fc Allow downgrade from any mode to mode 1 or 2. Allow setting all dual writer combinations (#95968)
* Allow downgrade from any mode to mode 1 or 2

* Allow for all combinations of dual writer setting

* Add all cases

* Include mode3
2024-11-11 10:52:36 +01:00
c4f906f7fa UniStore: Fix DualWriter compare method (#94705)
* UniStore: Fix DualWriter compare method

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-10-16 16:22:49 +02:00
de2c9a06bf Unified Storage: First iteration Dual Write Syncer (#89809)
* Unified Storage: First iteration Dual Write Syncer

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Leonor Oliveira <9090754+leonorfmartins@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-08-27 13:31:40 -03:00
f463d622d0 Chore: Remove depguard rule skip in apiserver (#91705) 2024-08-08 21:11:13 +03:00
93221f12da Unified Storage: Fix Compare method (#90455)
* Unified Storage: Fix Compare method

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-07-16 11:36:21 -03:00
d2bc4f3255 DualWrite: Cleanup and centralize the dual write creation (#90013) 2024-07-11 23:23:31 +03:00
9c6d3590a2 Chore: Fix apiserver circular dependencies (#89918) 2024-07-01 11:42:34 -04:00
2645958c8c Use global function to compare any entity to both stores (#89282)
* WIP implement generic compare interface

* Use global compare fn for all entities

* Lint

* Update pkg/apiserver/rest/dualwriter.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Don't need to hash, just compare bytes

* Fix tests

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-06-26 10:19:40 +02:00
fd44f2ee4f Init dualwriter metrics (#89003)
* Pass prometheus registerer to the dual writer

* Fix tests

* Remove unused var

* Fix tests

* Uncomment test

* Remove leading line

* Fix tests. Reuse registerer if there's already one

* Lint

* Improve double registering logic

* Rebase main
2024-06-14 11:01:49 +02:00
36f42853dd Storage: Read desired mode from config instead of feature flags (#88353)
* Read desired mode from config
* Update playlist integration tests
* Add mode 1 playlist integration tests
* Add mode 0 dual writing to playlist integration tests
* Add documentation for the different dual writing modes
2024-05-31 19:29:59 +02:00
0ffc4c441b Storage: Add mode reconciliation for modes 1 and 2 (#87919)
* Add skeleton implementation for mode reconciliation between 1 and 2
* Track mode for each dual writer
* Add test for setting dual writer
* Include context when setting dual writing mode

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-05-23 00:12:46 +02:00
4e532b00e1 Storage: Add mode-specific List implementations (#85814)
* Add List methods to mode 1 and 4
* Refactor errors
2024-04-11 13:41:05 +02:00
518d3341d5 Add Get method in dual writer (#85589)
* Add Get method in dual writer

* Update pkg/apiserver/rest/dualwriter_mode3.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Actually run the tests

* no need for t.Run()

* Update pkg/apiserver/rest/dualwriter_mode3.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update pkg/apiserver/rest/dualwriter_mode3.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update pkg/apiserver/rest/dualwriter_test.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Log improvements

* Fix method name

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-04-09 16:08:20 +02:00