Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32140206
D15467.1765029427.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D15467.1765029427.diff
View Options
diff --git a/services/identity/src/database/one_time_keys.rs b/services/identity/src/database/one_time_keys.rs
--- a/services/identity/src/database/one_time_keys.rs
+++ b/services/identity/src/database/one_time_keys.rs
@@ -28,6 +28,7 @@
OlmAccountType,
},
error::{consume_error, Error},
+ log::redact_sensitive_data,
olm::is_valid_olm_key,
};
@@ -335,12 +336,40 @@
let retryable_codes =
HashSet::from([CONDITIONAL_CHECK_FAILED, TRANSACTION_CONFLICT]);
if is_transaction_retryable(&dynamo_db_error, &retryable_codes) {
- info!("Encountered transaction conflict while uploading one-time keys - retrying");
+ let error_code = dynamo_db_error.to_string();
+ if error_code.contains(CONDITIONAL_CHECK_FAILED) {
+ info!(
+ user_id = redact_sensitive_data(user_id),
+ device_id = redact_sensitive_data(device_id),
+ error_type = "conditional_check_failed",
+ error_details = %dynamo_db_error,
+ "Conditional check failed while uploading one-time keys - retrying"
+ );
+ } else if error_code.contains(TRANSACTION_CONFLICT) {
+ info!(
+ user_id = redact_sensitive_data(user_id),
+ device_id = redact_sensitive_data(device_id),
+ error_type = "transaction_conflict",
+ error_details = %dynamo_db_error,
+ "Transaction conflict while uploading one-time keys - retrying"
+ );
+ } else {
+ info!(
+ user_id = redact_sensitive_data(user_id),
+ device_id = redact_sensitive_data(device_id),
+ error_type = "retryable_error",
+ error_details = %dynamo_db_error,
+ "Retryable error while uploading one-time keys - retrying"
+ );
+ }
exponential_backoff.sleep_and_retry().await?;
} else {
error!(
errorType = error_types::OTK_DB_LOG,
- "One-time key upload transaction failed: {:?}", dynamo_db_error
+ user_id = redact_sensitive_data(user_id),
+ device_id = redact_sensitive_data(device_id),
+ "One-time key upload transaction failed after retries: {:?}",
+ dynamo_db_error
);
return Err(Error::AwsSdk(dynamo_db_error));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 1:57 PM (11 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5837382
Default Alt Text
D15467.1765029427.diff (2 KB)
Attached To
Mode
D15467: [identity] better logging for OTKs upload
Attached
Detach File
Event Timeline
Log In to Comment