Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(deja): move the pin past the addressing fix and name the concurrent address forks (#14201)

Uzair Khan6244ba3468ca
diff --git a/Cargo.lock b/Cargo.lock
index 3513b9e367..da8fc556c1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2871,7 +2871,7 @@ checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b"
[[package]]
name = "deja"
version = "0.1.0"
-source = "git+https://github.com/juspay/deja?rev=de0a42a42248fc22722bc5a385d9fa6a39449e91#de0a42a42248fc22722bc5a385d9fa6a39449e91"
+source = "git+https://github.com/juspay/deja?rev=ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510#ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510"
dependencies = [
"deja-context",
"deja-core",
@@ -2888,7 +2888,7 @@ dependencies = [
[[package]]
name = "deja-context"
version = "0.1.0"
-source = "git+https://github.com/juspay/deja?rev=de0a42a42248fc22722bc5a385d9fa6a39449e91#de0a42a42248fc22722bc5a385d9fa6a39449e91"
+source = "git+https://github.com/juspay/deja?rev=ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510#ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510"
dependencies = [
"pin-project-lite",
]
@@ -2896,7 +2896,7 @@ dependencies = [
[[package]]
name = "deja-core"
version = "0.1.0"
-source = "git+https://github.com/juspay/deja?rev=de0a42a42248fc22722bc5a385d9fa6a39449e91#de0a42a42248fc22722bc5a385d9fa6a39449e91"
+source = "git+https://github.com/juspay/deja?rev=ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510#ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510"
dependencies = [
"serde",
"serde_json",
@@ -2906,7 +2906,7 @@ dependencies = [
[[package]]
name = "deja-derive"
version = "0.1.0"
-source = "git+https://github.com/juspay/deja?rev=de0a42a42248fc22722bc5a385d9fa6a39449e91#de0a42a42248fc22722bc5a385d9fa6a39449e91"
+source = "git+https://github.com/juspay/deja?rev=ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510#ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510"
dependencies = [
"proc-macro2",
"quote",
@@ -2916,7 +2916,7 @@ dependencies = [
[[package]]
name = "deja-diesel"
version = "0.1.0"
-source = "git+https://github.com/juspay/deja?rev=de0a42a42248fc22722bc5a385d9fa6a39449e91#de0a42a42248fc22722bc5a385d9fa6a39449e91"
+source = "git+https://github.com/juspay/deja?rev=ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510#ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510"
dependencies = [
"async-bb8-diesel",
"deja-runtime",
@@ -2926,7 +2926,7 @@ dependencies = [
[[package]]
name = "deja-runtime"
version = "0.1.0"
-source = "git+https://github.com/juspay/deja?rev=de0a42a42248fc22722bc5a385d9fa6a39449e91#de0a42a42248fc22722bc5a385d9fa6a39449e91"
+source = "git+https://github.com/juspay/deja?rev=ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510#ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510"
dependencies = [
"async-trait",
"deja-context",
diff --git a/crates/common_utils/Cargo.toml b/crates/common_utils/Cargo.toml
index 3f1d8f14e0..999f921ff6 100644
--- a/crates/common_utils/Cargo.toml
+++ b/crates/common_utils/Cargo.toml
@@ -32,7 +32,7 @@ base64-serde = "0.8.0"
blake3 = { version = "1.8.2", features = ["serde"] }
bytes = { version = "1.10.1", features = ["serde"] }
diesel = "2.2.10"
-deja = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true, default-features = false }
+deja = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true, default-features = false }
error-stack = "0.4.1"
futures = { version = "0.3.31", optional = true }
globset = "0.4.16"
diff --git a/crates/common_utils/src/keymanager.rs b/crates/common_utils/src/keymanager.rs
index 349a958520..2c7df849bc 100644
--- a/crates/common_utils/src/keymanager.rs
+++ b/crates/common_utils/src/keymanager.rs
@@ -16,7 +16,7 @@ use router_env::{
use crate::consts::EXTERNAL_CALL_TAG;
use crate::{
consts::{BASE64_ENGINE, TENANT_HEADER},
- errors,
+ date_time, errors,
external_service::ExternalServiceCall,
types::keymanager::{
BatchDecryptDataRequest, DataKeyCreateResponse, DecryptDataRequest,
@@ -140,7 +140,7 @@ where
))?;
let latency_ms = elapsed.as_millis();
- let created_at_timestamp = crate::date_time::now().assume_utc().unix_timestamp_nanos();
+ let created_at_timestamp = date_time::now().assume_utc().unix_timestamp_nanos();
#[cfg(feature = "ext_services_latency")]
{
let downstream_request_id = response
diff --git a/crates/common_utils/src/tokenization.rs b/crates/common_utils/src/tokenization.rs
index 915c86a3ef..ff6cd5e87e 100644
--- a/crates/common_utils/src/tokenization.rs
+++ b/crates/common_utils/src/tokenization.rs
@@ -3,7 +3,7 @@
//! This module provides types and functions for handling tokenized payment data,
//! including response structures and token generation utilities.
-use crate::consts::TOKEN_LENGTH;
+use crate::{consts::TOKEN_LENGTH, generate_nanoid_with_default_alphabet};
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
/// Generates a new token string
@@ -11,5 +11,5 @@ use crate::consts::TOKEN_LENGTH;
/// # Returns
/// A randomly generated token string of length `TOKEN_LENGTH`
pub fn generate_token() -> String {
- crate::generate_nanoid_with_default_alphabet(TOKEN_LENGTH)
+ generate_nanoid_with_default_alphabet(TOKEN_LENGTH)
}
diff --git a/crates/common_utils/src/types.rs b/crates/common_utils/src/types.rs
index a87d8186a9..e4bc05ff8c 100644
--- a/crates/common_utils/src/types.rs
+++ b/crates/common_utils/src/types.rs
@@ -54,7 +54,7 @@ use crate::{
},
errors::{CustomResult, ParsingError, PercentageError, ValidationError},
fp_utils::when,
- id_type, impl_enum_str,
+ generate_uuid_v7, id_type, impl_enum_str,
};
/// Represents Percentage Value between 0 and 100 both inclusive
@@ -1539,8 +1539,7 @@ pub struct PublishableKey(LengthString<PUBLISHABLE_KEY_LENGTH, PUBLISHABLE_KEY_L
impl PublishableKey {
/// Create a new PublishableKey Domain type without any length check from a static str
pub fn generate(env_prefix: &'static str) -> Self {
- let publishable_key_string =
- format!("pk_{env_prefix}_{}", crate::generate_uuid_v7().simple());
+ let publishable_key_string = format!("pk_{env_prefix}_{}", generate_uuid_v7().simple());
Self(LengthString::new_unchecked(publishable_key_string))
}
diff --git a/crates/diesel_models/Cargo.toml b/crates/diesel_models/Cargo.toml
index e3fc00a781..9827d20004 100644
--- a/crates/diesel_models/Cargo.toml
+++ b/crates/diesel_models/Cargo.toml
@@ -34,7 +34,7 @@ common_types = { version = "0.1.0", path = "../common_types" }
hyperswitch_masking = "0.0.1"
router_derive = { version = "0.1.0", path = "../router_derive" }
router_env = { version = "0.1.0", path = "../router_env", features = ["log_extra_implicit_fields", "log_custom_entries_to_extra"] }
-deja = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true, default-features = false, features = ["error-stack"] }
+deja = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true, default-features = false, features = ["error-stack"] }
[lints]
workspace = true
diff --git a/crates/external_services/Cargo.toml b/crates/external_services/Cargo.toml
index fb02ad7b81..e1da461b22 100644
--- a/crates/external_services/Cargo.toml
+++ b/crates/external_services/Cargo.toml
@@ -64,7 +64,7 @@ aws-smithy-types = "1.3.1"
base64 = "0.22.1"
dyn-clone = "1.0.19"
google-cloud-kms = { version = "0.6.0", optional = true }
-deja = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true, default-features = false }
+deja = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true, default-features = false }
error-stack = "0.4.1"
hex = "0.4.3"
hyper = "0.14.32"
diff --git a/crates/external_services/src/grpc_client/deja_transport.rs b/crates/external_services/src/grpc_client/deja_transport.rs
index da7ca964f4..f6c145aaf6 100644
--- a/crates/external_services/src/grpc_client/deja_transport.rs
+++ b/crates/external_services/src/grpc_client/deja_transport.rs
@@ -310,6 +310,10 @@ where
move || async { Err(BoxError::from(AbsentTransportError)) },
reconstruct_from_recorded,
extract_envelope,
+ // `FailStop` because that is what the thunk below does; the
+ // `on_miss` only names the stop. `Absorb` would tell the
+ // scorecard a request survived that in fact died here.
+ deja::MissPolicy::FailStop,
// The absent-EXECUTOR fail-stop, not `fail_stop_substitute_miss`:
// that one offers `replay_strategy = Execute` as the remedy, and
// with nothing beneath the boundary there is nothing to run. The
diff --git a/crates/external_services/src/http_client/boundary.rs b/crates/external_services/src/http_client/boundary.rs
index bb39db9526..6fcc5e07d7 100644
--- a/crates/external_services/src/http_client/boundary.rs
+++ b/crates/external_services/src/http_client/boundary.rs
@@ -174,22 +174,12 @@ impl deja::codec::ReplayCodec for HttpResponseCodec {
}
}
-/// Replay: reconstruct a `reqwest::Response` from a recorded `response_result`
-/// payload (`{status, response_headers, response_body: {raw_bytes: [...]}}`).
+/// Rebuilds a `reqwest::Response` from a recorded `response_result` payload, so
+/// a replayed connector call is served from the tape and touches no network.
///
-/// A recorded SUCCESS reconstructs verbatim: connectors read status, headers
-/// and body bytes, and all three come from the tape, so that call touches no
-/// network.
-///
-/// Returning `None` does not fall through to a live call. deja maps it to
-/// `Reconstructed::Failed`, which fail-stops the request with a named reason —
-/// so a recorded value this build cannot read halts the replay rather than
-/// quietly reaching the real endpoint.
-///
-/// Headers are read as an array of values per name and no other shape is
-/// accepted. A recording written before that capture stored a single string per
-/// name and had already lost every repeat; reading one would replay a tape that
-/// still carries the defect this fixes, so it fail-stops instead.
+/// Headers are read as an array of values per name; any other shape is a
+/// pre-fix recording that had already lost its repeats, so it is refused.
+/// `None` fail-stops with a named reason — never a fallback to a live call.
pub(super) fn replay_response(recorded: &serde_json::Value) -> Option<reqwest::Response> {
let status_code = u16::try_from(recorded.get("status")?.as_u64()?).ok()?;
let status = http::StatusCode::from_u16(status_code).ok()?;
@@ -204,9 +194,6 @@ pub(super) fn replay_response(recorded: &serde_json::Value) -> Option<reqwest::R
let mut builder = http::Response::builder().status(status);
if let Some(headers) = recorded.get("response_headers").and_then(|h| h.as_object()) {
for (name, values) in headers {
- // `?` rather than a skip: a name whose values are not an array is a
- // pre-fix recording, and replaying it with its headers dropped would
- // be worse than refusing it.
for value in values.as_array()?.iter().filter_map(|value| value.as_str()) {
// `Builder::header` is `try_append`, so a repeated name keeps
// every value rather than replacing the previous one.
diff --git a/crates/external_services/src/superposition.rs b/crates/external_services/src/superposition.rs
index 1130dfd6b3..8eebca1453 100644
--- a/crates/external_services/src/superposition.rs
+++ b/crates/external_services/src/superposition.rs
@@ -211,6 +211,10 @@ mod deja_boundary {
run,
reconstruct::<T>,
capture::<T>,
+ // `Absorb`: the thunk hands back an error the caller survives —
+ // the DB->default fallback runs and the correlation continues. The
+ // miss is still scored, only named as survivable.
+ deja::MissPolicy::Absorb,
move || {
Err(report!(SuperpositionError::NotFound(format!(
"deja replay: no recorded Superposition value for `{operation}` (novel \
diff --git a/crates/redis_interface/Cargo.toml b/crates/redis_interface/Cargo.toml
index 3b6bbdc7e7..c0fcba4d93 100644
--- a/crates/redis_interface/Cargo.toml
+++ b/crates/redis_interface/Cargo.toml
@@ -35,7 +35,7 @@ fred = { version = "8.0.6", optional = true, features = [
# First party crates
common_utils = { version = "0.1.0", path = "../common_utils", features = ["async_ext"] }
-deja = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true, default-features = false, features = ["error-stack"] }
+deja = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true, default-features = false, features = ["error-stack"] }
hyperswitch_masking = "0.0.1"
router_env = { version = "0.1.0", path = "../router_env", optional = true }
diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml
index 665cf7dcc7..4d900f0c17 100644
--- a/crates/router/Cargo.toml
+++ b/crates/router/Cargo.toml
@@ -300,8 +300,8 @@ common_utils = { version = "0.1.0", path = "../common_utils", features = [
"keymanager",
] }
common_types = { version = "0.1.0", path = "../common_types" }
-deja = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true, default-features = false }
-deja-core = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true }
+deja = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true, default-features = false }
+deja-core = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true }
connector_configs = { version = "0.1.0", path = "../connector_configs" }
currency_conversion = { version = "0.1.0", path = "../currency_conversion" }
diesel_models = { version = "0.1.0", path = "../diesel_models", features = [
diff --git a/crates/router/src/core/payments/operations/payment_confirm.rs b/crates/router/src/core/payments/operations/payment_confirm.rs
index a6583fe224..1d875fcdc2 100644
--- a/crates/router/src/core/payments/operations/payment_confirm.rs
+++ b/crates/router/src/core/payments/operations/payment_confirm.rs
@@ -194,6 +194,12 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
let store = state.store.clone();
let key_store_clone = platform.get_processor().get_key_store().clone();
+ // Each fork below gets its own span rather than the caller's. These are
+ // spawned side by side and joined together, so under one shared span
+ // they are separable only by the order the scheduler picks, and a
+ // record/replay comparison pairs them positionally — reading a
+ // transposition as a behaviour change. The concurrency was always here;
+ // naming each fork writes it down.
let business_profile_fut = tokio::spawn(
async move {
store
@@ -207,7 +213,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
})
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("business_profile")),
);
let store = state.store.clone();
@@ -229,7 +235,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
.map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_attempt")),
);
let m_merchant_id = processor_merchant_id.clone();
@@ -257,7 +263,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
)
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("shipping_address")),
);
let m_merchant_id = processor_merchant_id.clone();
@@ -285,7 +291,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
)
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("billing_address")),
);
let store = state.clone().store;
@@ -306,7 +312,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
.map(|x| x.transpose())
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("config_update")),
);
// Based on whether a retry can be performed or not, fetch relevant entities
@@ -558,7 +564,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
})
.await)
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("additional_pm_data")),
);
let n_payment_method_billing_address_id =
@@ -602,7 +608,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
)
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_method_billing")),
);
let mandate_type = m_helpers::get_mandate_type(
@@ -638,7 +644,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("mandate_details")),
);
// Parallel calls - level 2
@@ -2945,7 +2951,7 @@ impl<F: Clone + Sync> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for
.map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_attempt")),
);
let billing_address = payment_data.address.get_payment_billing();
@@ -3073,7 +3079,7 @@ impl<F: Clone + Sync> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for
.map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_intent")),
);
let (payment_intent, payment_attempt) = tokio::try_join!(
diff --git a/crates/router/src/core/payments/operations/payment_recurrence.rs b/crates/router/src/core/payments/operations/payment_recurrence.rs
index 52c32b03dc..9dc603d3a5 100644
--- a/crates/router/src/core/payments/operations/payment_recurrence.rs
+++ b/crates/router/src/core/payments/operations/payment_recurrence.rs
@@ -167,6 +167,9 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
.attach_printable("'profile_id' not set in payment intent")?;
let mandate_dimensions = dimensions.with_profile_id(profile_id.clone());
+ // Own span per fork, not the caller's: these are joined together, so a
+ // shared span leaves them separable only by scheduler order and a
+ // record/replay comparison reads a transposition as a behaviour change.
let additional_pm_data_fut = tokio::spawn(
async move {
Ok(n_request_payment_method_data
@@ -183,7 +186,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
})
.await)
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("additional_pm_data")),
);
let session_state = state.clone();
@@ -205,7 +208,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
)
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_method_billing")),
);
let mandate_type = m_helpers::get_mandate_type(
@@ -245,7 +248,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("mandate_details")),
);
let (mandate_details, additional_pm_info, payment_method_billing) = tokio::try_join!(
@@ -630,7 +633,7 @@ impl<F: Clone + Sync> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for
.map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_attempt")),
);
let m_payment_data_payment_intent = payment_data.payment_intent.clone();
@@ -651,7 +654,7 @@ impl<F: Clone + Sync> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for
.map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_intent")),
);
let (payment_intent, payment_attempt) = tokio::try_join!(
diff --git a/crates/router/src/core/payments/operations/payment_response.rs b/crates/router/src/core/payments/operations/payment_response.rs
index ed1d140f98..f3c644c5d6 100644
--- a/crates/router/src/core/payments/operations/payment_response.rs
+++ b/crates/router/src/core/payments/operations/payment_response.rs
@@ -3086,6 +3086,9 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
.transpose()?
.unwrap_or(payment_attempt);
+ // Own span per fork, not the caller's: these are joined together, so a
+ // shared span leaves them separable only by scheduler order and a
+ // record/replay comparison reads a transposition as a behaviour change.
let payment_attempt_fut = tokio::spawn(
async move {
Box::pin(async move {
@@ -3106,7 +3109,7 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
})
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_attempt")),
);
payment_data.payment_attempt = payment_attempt;
@@ -3166,7 +3169,7 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
.map(|x| x.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound))
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("payment_intent")),
);
// When connector requires redirection for mandate creation it can update the connector mandate_id during Psync and CompleteAuthorize
@@ -3196,7 +3199,7 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
)
.await
}
- .in_current_span(),
+ .instrument(tracing::debug_span!("mandate_update")),
);
let (payment_intent, _, payment_attempt) = futures::try_join!(
diff --git a/crates/router_env/Cargo.toml b/crates/router_env/Cargo.toml
index 4cb4288476..148c782bc3 100644
--- a/crates/router_env/Cargo.toml
+++ b/crates/router_env/Cargo.toml
@@ -10,8 +10,8 @@ license.workspace = true
[dependencies]
cargo_metadata = "0.18.1"
config = { version = "0.14.1", features = ["toml"] }
-deja = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true, default-features = false }
-deja-core = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true }
+deja = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true, default-features = false }
+deja-core = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true }
error-stack = "0.4.1"
gethostname = "0.4.3"
# Optional (deja-only): types the captured request/response payloads as `Secret`
diff --git a/crates/router_env/src/request_id.rs b/crates/router_env/src/request_id.rs
index 1cf3309ab1..40faf2c11d 100644
--- a/crates/router_env/src/request_id.rs
+++ b/crates/router_env/src/request_id.rs
@@ -148,6 +148,10 @@ pub(crate) mod boundary {
return None;
}
let recorded = hook.try_replay_with_context(deja::ReplayLookup {
+ // `FailStop`: with no `on_miss` the caller mints a fresh uuid —
+ // a value the recording never held, and one the rest of the
+ // correlation is then keyed on.
+ miss_policy: deja::MissPolicy::FailStop,
boundary: "id_generation",
trait_name: "router_env::request_id",
method_name,
diff --git a/crates/storage_impl/Cargo.toml b/crates/storage_impl/Cargo.toml
index 22d95cbea2..5c6e05fb60 100644
--- a/crates/storage_impl/Cargo.toml
+++ b/crates/storage_impl/Cargo.toml
@@ -29,7 +29,7 @@ api_models = { version = "0.1.0", path = "../api_models" }
common_enums = { version = "0.1.0", path = "../common_enums" }
common_utils = { version = "0.1.0", path = "../common_utils" }
common_types = { version = "0.1.0", path = "../common_types" }
-deja = { git = "https://github.com/juspay/deja", rev = "de0a42a42248fc22722bc5a385d9fa6a39449e91", optional = true, default-features = false }
+deja = { git = "https://github.com/juspay/deja", rev = "ade8fd16c1d8a4d23ca8fa3397bf70fe94e80510", optional = true, default-features = false }
diesel_models = { version = "0.1.0", path = "../diesel_models", default-features = false }
hyperswitch_domain_models = { version = "0.1.0", path = "../hyperswitch_domain_models", default-features = false }
hyperswitch_masking = "0.0.1"