"latest" integer in AppState isn’t persistent between runs #16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The simulator API keeps a latest integer in AppState (an AtomicI64) which is updated from the latest query‑parameter on each request and returned by GET /latest.
Currently that value is only stored in memory and initialised to -1 when the server starts:
No code ever writes it to the database or disk, so when you stop/restart the container the value is reset. This makes it impossible for the server to remember its last‑seen value across deployments.
Suggested fix: Persist the value somewhere (such as a new row in SQLite or a small file in the mounted volume) and load/update it through the existing service layer, so container rebuilds and restarts don’t lose it.
Should be fixed, see
10da5395a3Commit was reverted