Commit graph

15 commits

Author SHA1 Message Date
Dustin J. Mitchell
b858febbca
Apply fixes from @ryneeverett
Co-authored-by: ryneeverett <ryneeverett@gmail.com>
2025-07-14 12:30:01 -04:00
Dustin J. Mitchell
25911b44a6
More explicit requirements regarding add_version
The core crate calls `get_client` and verifies the `latest_version_id`
before it invokes `add_version`. With the SQLite backend, transactions
lock the entire database, so these two queries cannot be interleaved
with any changes to the `latest_version_id` and there's no possibility
of incorrect updates. With Postgres (#129) the effect is similar: the
read performed by `get_client` locks that row and prevents other
transactions from writing to it.

However, the storage trait should not rely on this behavior --
`add_version` should verify that it is adding a new version on top of
the correct parent version.
2025-07-13 13:04:38 -04:00
Dustin J. Mitchell
093446e5fb
bump major version 2025-07-12 15:24:13 -04:00
Dustin J. Mitchell
7559364017
Make Storage methods async
This will better support concurrent requests.
2025-07-11 17:37:14 -04:00
Dustin J. Mitchell
4b55423595
Bump to -pre version 2025-03-03 22:43:37 +00:00
Dustin J. Mitchell
a9b9921833
v0.6.1 2025-03-03 22:41:40 +00:00
Dustin J. Mitchell
7430d6feec
add homepage / repository to published crates (#100) 2025-03-03 16:59:09 -05:00
Dustin J. Mitchell
55892d3b2d
Bump to -pre version 2025-03-01 18:21:09 +00:00
Dustin J. Mitchell
5c3455a38a
v0.6.0 2025-03-01 18:16:48 +00:00
Dustin J. Mitchell
5332d90c57
Improve error handling in the inmemory storage implementation. (#79)
Improve error handling in the inmemory storage

This addresses a TODO, in a type that is really only used for testing.

This also adds a test for a similar circumstance -- adding the same
version twice -- in the SQLite storage, but it is already handled
correctly.
2025-01-13 08:32:27 -05:00
Dustin J. Mitchell
65a3d806d7
Followup to the 0.5.0 release (#76)
* Document RELEASING.md process
* Bump version numbers
* Do not automatically produce GH releases, and do not build binaries to attach to them
* Only build docker images on tags
* Use the `latest` Docker image tag in the Docker-compose config
2024-12-15 22:51:57 -05:00
Dustin J. Mitchell
1828a31a24
Make storage transactions specific to a client_id (#67)
Transactions for different client_ids cannot interfere with one another,
so this provides an opportunity for the sort of concurrency that a
mult-client hosting solution might need. For example, a postgres backend
could lock the client row in each transaction.
2024-11-27 00:09:03 -05:00
Dustin J. Mitchell
4029c03479
Support sequential consistency in SQLite implementation (#64)
This is a bit tricky because the `Storage` trait is `Send + Sync`, but
an SQLite connection is neither. Since this is not intended for
large-scale use, the simple solution is just to open a new SQLite
connection for each transaction. More complex alternatives include
thread-local connection pools or a "worker thread" that owns the
connection and communicates with other threads via channels.

This also updates the InMemoryStorage implementation to be a bit more
strict about transactional integrity, which led to a number of test
changes.
2024-11-26 16:22:35 -05:00
Dustin J. Mitchell
2b1ad12a79
Add cargo-semver-checks (#59) 2024-11-17 17:59:39 -05:00
Dustin J. Mitchell
47ce4c1e3b
Split the server into three crates (#56)
This will make it easier to build variations on the server, or embed it
into larger projects.
2024-11-17 15:12:42 -05:00