Since the batch_uploads primary key already contains user_id, it does
nothing to increase time resolution. The counter may still see
conflicts with other processes, but the probably is much lower
now. (Spanner uses UUIDv4 for batch IDs.)
The user_id hack was added in e9b455fd "to match the Python
implementation". E2E tests are failing because we can now
generate more than one batch within 10 ms.
Signed-off-by: Tommie Gannert <tommie@gannert.se>
See https://diesel.rs/guides/migration_guide.html.
- This pulls in mysqlclient-sys >=0.4.0, which allows using libmariadb instead of libmysqlclient.
That allows using Debian's bundled client library.
MySQL's APT repository only has packages for AMD64.
- Connections are now passed as mut refs, which requires RefCell/RwLock.
- Embedded migrations had a slight API change.
- put_bso_sync was calling update_collection without its transaction, which now causes a deadlock.
Updated to write inside its transaction.
Signed-off-by: Tommie Gannert <tommie@gannert.se>
* style: Rename MysqlError to SqlError as they are generic
* refactor: Don't use legacy numerics contant and methods
* style: Cargo fmt
* style: Keep Mysql specific error in Mysql code
---------
Co-authored-by: JR Conlin <jconlin+git@mozilla.com>
chore: Updates for Jun-2024
* f normalize diesel to 1.4
We're currenlty locked to diesel 1.4 due to some significant changes
in the `diesel_logger` crate and how it expects `Connections` to be
defined.
* feat: Add normalized ReportableError to errors
We want to do things like add tags and other features to sync errors the
way that we do in other packages. To do so, we're backporting
ReportableError from Autopush to Syncstorage.
This also addresses some clippy fixes required by 1.78
This continues to use the `Taggable` trait, which we may want to
port to autopush.
Closes SYNC-4262
* bug: Allow threadpool size to be set.
It appears that the replacement for setting ACTIX_THREADPOOL would be to
call `ServiceBuilder.worker_max_blocking_threads()` This PR introduces
the ability to set this value by using the
`worker_max_blocking_threads`configuration variable.
Closes #SYNC-4271
* Removes pyo3 and derives tokens directly in Rust
* Adds tests for JWT verifying
* Adds tests for token generation
* Adds metrics for oauth verify error cases
* Updates jsonwebtoken to not include default features (including pem loading)
* Adds context and logs errors during oauth verify
* Uses ring for cryptographic rng
* Adds back python impl under feature flag
* Uses one cached http client for reqwest
Update package description and some dependencies to use `workspace`
inheritance.
* Also updates circleci to produce dockerhub image.
Closes#1461
Issue #1362
* f touch to retry circleci
* f try to pre-emptively lock protobuf to the older 2.25.2 version
* f force Cargo.lock to use protobuf 2.25.2, dammit
* f move protobuf pin to syncstorage-spanner
* f revert cargo.lock
* f revert #448
* f update base64 / tickle circleci
* f update cadence (and kick circleci)
* f clippy
* f switch to latest google-cloud-rust
* f update to use google-cloud-rust