diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4377e6f725..b8231674c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,38 @@
+
+## 0.5.6 (2020-08-11)
+
+
+#### Features
+
+* More purge_ttl features (#776) ([59aa28a4](https://github.com/mozilla-services/syncstorage-rs/commit/59aa28a4e5fdcfe2acc3f767487066d30b998af0), closes [#735](https://github.com/mozilla-services/syncstorage-rs/issues/735), [#743](https://github.com/mozilla-services/syncstorage-rs/issues/743))
+
+#### Bug Fixes
+
+* remove ubuntu target for grpcio (#775) ([7d1061f7](https://github.com/mozilla-services/syncstorage-rs/commit/7d1061f7197a56936a6cff9a438997640892d6c6), closes [#774](https://github.com/mozilla-services/syncstorage-rs/issues/774))
+* Return WeaveError::OverQuota for over quota responses (#773) ([38cd5ddd](https://github.com/mozilla-services/syncstorage-rs/commit/38cd5dddc36ae0aeda159fea88ba6128a8e85181), closes [#769](https://github.com/mozilla-services/syncstorage-rs/issues/769))
+* ensure an X-Last-Modified for /info/configuration (#761) ([36533f85](https://github.com/mozilla-services/syncstorage-rs/commit/36533f8566c39e8c82ccb5a2bc8ae62fb254129a), closes [#759](https://github.com/mozilla-services/syncstorage-rs/issues/759))
+
+
+
+
+### 0.5.5 (2020-08-06)
+
+#### Bug Fixes
+
+* set config env separator to double underscore. (#763) ([f1d88fea](https://github.com/mozilla-services/syncstorage-rs/commit/f1d88feae60d7fea15b7575ac2108f0f80ff42b4), closes [#762](https://github.com/mozilla-services/syncstorage-rs/issues/762))
+
+
+
+
+### 0.5.4 (2020-08-04)
+
+
+#### Features
+
+* add debug_client check to BsoBodies for batch operations. ([1370df9d](https://github.com/mozilla-services/syncstorage-rs/commit/1370df9d7c2e6d656f50332b3f8615faafacead0)
+
+
+
## 0.5.3 (2020-07-31)
diff --git a/Cargo.lock b/Cargo.lock
index 74b2a80ba7..7549eeea6c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -777,6 +777,20 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "deadpool"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4aaff9a7a1de9893f4004fa08527b31cb2ae4121c44e053cf53f29203c73bd23"
+dependencies = [
+ "async-trait",
+ "config",
+ "crossbeam-queue",
+ "num_cpus",
+ "serde 1.0.114",
+ "tokio",
+]
+
[[package]]
name = "debugid"
version = "0.7.2"
@@ -1994,9 +2008,9 @@ dependencies = [
[[package]]
name = "protobuf"
-version = "2.16.2"
+version = "2.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d883f78645c21b7281d21305181aa1f4dd9e9363e7cf2566c93121552cff003e"
+checksum = "cb14183cc7f213ee2410067e1ceeadba2a7478a59432ff0747a335202798b1e2"
[[package]]
name = "quick-error"
@@ -2706,7 +2720,7 @@ dependencies = [
[[package]]
name = "syncstorage"
-version = "0.5.3"
+version = "0.5.5"
dependencies = [
"actix-cors",
"actix-http",
@@ -2719,6 +2733,7 @@ dependencies = [
"cadence",
"chrono",
"config",
+ "deadpool",
"diesel",
"diesel_logger",
"diesel_migrations",
@@ -2755,6 +2770,7 @@ dependencies = [
"time 0.2.16",
"tokio",
"url 2.1.1",
+ "urlencoding",
"uuid",
"validator",
"validator_derive",
@@ -3139,6 +3155,12 @@ dependencies = [
"serde 1.0.114",
]
+[[package]]
+name = "urlencoding"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9232eb53352b4442e40d7900465dfc534e8cb2dc8f18656fcb2ac16112b5593"
+
[[package]]
name = "uuid"
version = "0.8.1"
diff --git a/Cargo.toml b/Cargo.toml
index eb7ca5ac7c..102cb80688 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "syncstorage"
-version = "0.5.3"
+version = "0.5.5"
license = "MPL-2.0"
authors = [
"Ben Bangert ",
@@ -26,6 +26,7 @@ bytes = "0.5"
cadence = "0.20.0"
chrono = "0.4"
config = "0.10"
+deadpool = "0.5.2"
diesel = { version = "1.4.4", features = ["mysql", "r2d2"] }
diesel_logger = "0.1.1"
diesel_migrations = { version = "1.4.0", features = ["mysql"] }
@@ -34,6 +35,9 @@ env_logger = "0.7.1"
failure = "0.1.8"
futures = { version = "0.3", features = ["compat"] }
googleapis-raw = { version = "0", path = "vendor/mozilla-rust-sdk/googleapis-raw" }
+# Some versions of OpenSSL 1.1.1 conflict with grpcio's built-in boringssl which can cause
+# syncserver to either fail to either compile, or start. In those cases, try
+# `cargo build --features grpcio/openssl ...`
grpcio = { version = "0.6.0" }
lazy_static = "1.4.0"
hawk = "3.2"
@@ -44,7 +48,7 @@ log = { version = "0.4.8", features = ["max_level_info", "release_max_level_info
mime = "0.3"
num_cpus = "1"
# must match what's used by googleapis-raw
-protobuf = "2.15"
+protobuf = "2.17.0"
rand = "0.7"
regex = "1.3"
sentry = { version = "0.19", features = ["with_curl_transport"] }
@@ -62,6 +66,7 @@ slog-stdlog = "4.0"
slog-term = "2.6"
time = "0.2"
url = "2.1"
+urlencoding = "1.1"
uuid = { version = "0.8.1", features = ["serde", "v4"] }
validator = "0.10"
validator_derive = "0.10"
diff --git a/README.md b/README.md
index e14433c665..256098474d 100644
--- a/README.md
+++ b/README.md
@@ -122,7 +122,7 @@ This requires access to the mozilla-rust-sdk which is now available at `/vendor/
### Connecting to Firefox
-This will walk you through the steps to connect this project to your local copy of Firefox.
+This will walk you through the steps to connect this project to your local copy of Firefox.
1. Follow the steps outlined above for running this project using [MySQL](https://github.com/mozilla-services/syncstorage-rs#mysql).
@@ -201,11 +201,13 @@ Open a PR after doing the following:
Once your PR merges, then go ahead and create an official [GitHub release](https://github.com/mozilla-services/syncstorage-rs/releases).
-
## Troubleshooting
- `rm Cargo.lock; cargo clean;` - Try this if you're having problems compiling.
+- Some versions of OpenSSL 1.1.1 can conflict with grpcio's built in BoringSSL. These errors can cause syncstorage to fail to run or compile.
+If you see a problem related to `libssl` you may need to specify the `cargo` option `--features grpcio/openssl` to force grpcio to use OpenSSL.
+
## Related Documentation
- [API docs](https://mozilla-services.readthedocs.io/en/latest/storage/apis-1.5.html)
diff --git a/src/db/results.rs b/src/db/results.rs
index 3b063f44cf..93f49f706c 100644
--- a/src/db/results.rs
+++ b/src/db/results.rs
@@ -94,6 +94,15 @@ impl From for PoolState {
}
}
+impl From for PoolState {
+ fn from(status: deadpool::Status) -> PoolState {
+ PoolState {
+ connections: status.size as u32,
+ idle_connections: status.available as u32,
+ }
+ }
+}
+
#[cfg(test)]
pub type GetCollectionId = i32;
diff --git a/src/db/spanner/batch.rs b/src/db/spanner/batch.rs
index 6869e4805d..66ba26b41f 100644
--- a/src/db/spanner/batch.rs
+++ b/src/db/spanner/batch.rs
@@ -18,7 +18,7 @@ use crate::{
};
pub async fn create_async(
- db: &SpannerDb<'_>,
+ db: &SpannerDb,
params: params::CreateBatch,
) -> Result {
let batch_id = Uuid::new_v4().to_simple().to_string();
@@ -57,7 +57,7 @@ pub async fn create_async(
Ok(batch_id)
}
-pub async fn validate_async(db: &SpannerDb<'_>, params: params::ValidateBatch) -> Result {
+pub async fn validate_async(db: &SpannerDb, params: params::ValidateBatch) -> Result {
let collection_id = db.get_collection_id_async(¶ms.collection).await?;
let exists = db
.sql(
@@ -81,7 +81,7 @@ pub async fn validate_async(db: &SpannerDb<'_>, params: params::ValidateBatch) -
Ok(exists.is_some())
}
-pub async fn append_async(db: &SpannerDb<'_>, params: params::AppendToBatch) -> Result<()> {
+pub async fn append_async(db: &SpannerDb, params: params::AppendToBatch) -> Result<()> {
let mut metrics = db.metrics.clone();
metrics.start_timer("storage.spanner.append_items_to_batch", None);
@@ -106,7 +106,7 @@ pub async fn append_async(db: &SpannerDb<'_>, params: params::AppendToBatch) ->
}
pub async fn get_async(
- db: &SpannerDb<'_>,
+ db: &SpannerDb,
params: params::GetBatch,
) -> Result