Skip to content

Commit c5185a1

Browse files
committed
Add comment
1 parent 04087f4 commit c5185a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/sentry/deletions/defaults/group.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,17 @@ def chunk(self) -> bool:
175175
if the deletion has completed and if it needs to be called again."""
176176
events = self.get_unfetched_events()
177177
if events:
178+
# Ideally, in some cases, we should also delete the associated event from the Nodestore.
179+
# In the occurrence_consumer [1] we sometimes create a new event but it's hard in post-ingestion to distinguish between
180+
# a created event and an existing one.
181+
# https://github.com/getsentry/sentry/blob/a86b9b672709bc9c4558cffb2c825965b8cee0d1/src/sentry/issues/occurrence_consumer.py#L324-L339
178182
self.delete_events_from_nodestore(events)
179183
# This value will be used in the next call to chunk
180184
self.last_event = events[-1]
181185
# As long as it returns True the task will keep iterating
182186
return True
183187
else:
184-
# Now that all events have been deleted from the eventstore, we can delete the events from snuba
188+
# Now that all events have been deleted from the eventstore, we can delete the occurrences from Snuba
185189
self.delete_events_from_snuba()
186190
return False
187191

0 commit comments

Comments
 (0)