diff --git a/syncserver-common/src/lib.rs b/syncserver-common/src/lib.rs index 1ff1529c..424d48f4 100644 --- a/syncserver-common/src/lib.rs +++ b/syncserver-common/src/lib.rs @@ -85,7 +85,6 @@ pub trait ReportableError: std::fmt::Display { } /// Experimental: return key value pairs for Sentry Event's extra data - /// TODO: should probably return Vec<(&str, Value)> or Vec<(String, Value)> fn extras(&self) -> Vec<(&str, Value)> { vec![] } diff --git a/syncserver/src/server/mod.rs b/syncserver/src/server/mod.rs index 63d9baa8..e17dda10 100644 --- a/syncserver/src/server/mod.rs +++ b/syncserver/src/server/mod.rs @@ -94,7 +94,6 @@ macro_rules! build_app { )) .wrap_fn(middleware::weave::set_weave_timestamp) .wrap_fn(tokenserver::logging::handle_request_log_line) - //.wrap_fn(middleware::sentry::report_error) .wrap_fn(middleware::rejectua::reject_user_agent) .wrap($cors) .wrap_fn(middleware::emit_http_status_with_tokenserver_origin) @@ -203,7 +202,6 @@ macro_rules! build_app_without_syncstorage { "api_error".to_owned(), )) // These are our wrappers - //.wrap_fn(middleware::sentry::report_error) .wrap_fn(tokenserver::logging::handle_request_log_line) .wrap_fn(middleware::rejectua::reject_user_agent) // Followed by the "official middleware" so they run first. diff --git a/syncstorage-mysql/src/test.rs b/syncstorage-mysql/src/test.rs index 55b98ea1..44dc4cdb 100644 --- a/syncstorage-mysql/src/test.rs +++ b/syncstorage-mysql/src/test.rs @@ -53,12 +53,9 @@ fn static_collection_id() -> DbResult<()> { // The integration tests can create collections that start // with `xxx%`. We should not include those in our counts for local // unit tests. - // Note: not sure why but as of 11/02/20, `.not_like("xxx%")` is apparently - // swedish-ci. Commenting that out for now. let results: HashMap = collections::table .select((collections::id, collections::name)) .filter(collections::name.ne("")) - //.filter(collections::name.not_like("xxx%")) // from most integration tests .filter(collections::name.ne("xxx_col2")) // from server::test .filter(collections::name.ne("col2")) // from older intergration tests .load(&db.inner.conn)? diff --git a/syncstorage-spanner/src/batch.rs b/syncstorage-spanner/src/batch.rs index 6b2439fe..71c518a0 100644 --- a/syncstorage-spanner/src/batch.rs +++ b/syncstorage-spanner/src/batch.rs @@ -283,8 +283,6 @@ pub async fn do_append_async( //prefetch the existing batch_bsos for this user's batch. let mut existing = HashSet::new(); - let mut collisions = HashSet::new(); - let mut count_collisions = 0; let mut tags = HashMap::new(); tags.insert( "collection".to_owned(), @@ -351,13 +349,6 @@ pub async fn do_append_async( payload: bso.payload, ttl: bso.ttl, }); - // BSOs should only update records that were in previous batches. - // There is the potential that some may update records in their own batch. - // This will attempt to record such incidents. - // TODO: If we consistently see no results for this, it can be safely dropped. - if collisions.contains(&exist_idx) { - count_collisions += 1; - } } else { let sortindex = bso .sortindex @@ -389,18 +380,9 @@ pub async fn do_append_async( value.set_list_value(row); insert.push(value); existing.insert(exist_idx.clone()); - collisions.insert(exist_idx); }; } - if count_collisions > 0 { - db.metrics.count_with_tags( - "storage.spanner.batch.collisions", - count_collisions, - tags.clone(), - ); - } - if db.quota.enabled { if let Some(size) = batch.size { if size + running_size >= db.quota.size {