`devshards` Postgres support for `devshard` storage #1098
Problem
devshard/storage is sqlite-only today (storage/sqlite.go,
modernc.org/sqlite). Running production devshards on embedded sqlite is
the wrong default:
- Every
devsharddinstance holds its own file, so nothing aggregates across hosts or across versions managed byversiond. - A production operator already runs Postgres for
decentralized-api(seedecentralized-api/payloadstorage/,decentralized-api/statsstorage/); forcing a second on-box database in sqlite duplicates backup, monitoring, and retention setups. - Integration tests and CI, by contrast, benefit from sqlite: zero dependencies, per-test cleanup, in-memory mode, fast startup.
We want both backends behind a single interface, chosen at runtime the
same way decentralized-api/payloadstorage does it.
Also we should prune the old epoch's devshard data
Goals
- Keep
devshard/storage.Storageas the sole interface consumed bydevshard/hostand the rest of the module; do not leak backend specifics into callers. - Add a Postgres backend alongside the existing sqlite backend. It should be default db
- Prune data related to devshards created at epochs
< currentEpoch - 2
💬 Comments (3)
https://github.com/gonka-ai/gonka/pull/1126
Closed by #1145
🔄 Auto-synced from Issue #1098 every hour.
Hi, can i grab this one for couple of week ?