Skip to content

Commit 9816bc4

Browse files
committed
use primary grouphash rather than searching for it
1 parent 602c220 commit 9816bc4

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/sentry/grouping/ingest/seer.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -381,23 +381,8 @@ def maybe_check_seer_for_matching_grouphash(
381381
)
382382
return None
383383

384-
# Find the GroupHash corresponding to the hash value sent to Seer
385-
#
386-
# TODO: There shouldn't actually be more than one hash in `all_grouphashes`, but
387-
# a) there's a bug in our precedence logic which leads both in-app and system stacktrace
388-
# hashes being marked as contributing and making it through to this point, and
389-
# b) because of how we used to compute secondary and primary hashes, we keep secondary
390-
# hashes even when we don't need them.
391-
# Once those two problems are fixed, there will only be one hash passed to this function
392-
# and we won't have to do this search to find the right one to update.
393-
primary_hash = event.get_primary_hash()
394-
395-
grouphash_sent = list(
396-
filter(lambda grouphash: grouphash.hash == primary_hash, all_grouphashes)
397-
)[0]
398-
399384
# Update the relevant GroupHash with Seer results
400-
gh_metadata = grouphash_sent.metadata
385+
gh_metadata = event_grouphash.metadata
401386
if gh_metadata:
402387

403388
# TODO: This should never be true (anything created with `objects.create` should have an

0 commit comments

Comments
 (0)