Skip to content

Commit

Permalink
Add back check
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo committed Aug 27, 2024
1 parent 2cb8511 commit 5d4f52e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions relay-server/src/endpoints/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ pub async fn handle_envelope(
)
}

// TODO(jjbayer): Remove this check once spool v1 is removed.
if state.memory_checker().check_memory().is_exceeded() {
// NOTE: Long-term, we should not reject the envelope here, but spool it to disk instead.
// This will be fixed with the new spool implementation.
return Err(BadStoreRequest::QueueFailed);
};

let mut managed_envelope = ManagedEnvelope::new(
envelope,
state.outcome_aggregator().clone(),
Expand Down

0 comments on commit 5d4f52e

Please sign in to comment.