From 042799c9ad311003bb19a6e667b86e3e80764546 Mon Sep 17 00:00:00 2001 From: Lyn Nagara Date: Fri, 20 Dec 2024 15:47:38 -0800 Subject: [PATCH] fix: fixes KeyError when running with stale topic dlq --- src/sentry/consumers/dlq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/consumers/dlq.py b/src/sentry/consumers/dlq.py index ab021f26c1e50d..43b4b8c3dcd12b 100644 --- a/src/sentry/consumers/dlq.py +++ b/src/sentry/consumers/dlq.py @@ -113,7 +113,7 @@ def submit(self, message: Message[KafkaPayload]) -> None: # If we get a valid message for a partition later, don't emit a filtered message for it if self.offsets_to_forward: for partition in message.committable: - self.offsets_to_forward.pop(partition) + self.offsets_to_forward.pop(partition, None) self.next_step.submit(message)