getsentry / getsentry/sentry

merging two issues can cause events to not be reflected in total event count ("times_seen")

Open
#25,673 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

## Important Details

This affects all Sentry versions, like with #25672 the environment information is irrelevant.

## Description

See #25672 for an introduction to event counts and what they are. This is again about `times_seen`.

## Steps to Reproduce

1. Make sure Sentry's `buffers` backend debounces incrs aggressively (not necessarily the case in development)
2. Have two issues younger than 90d, which continue to get some events every second.
3. Merge them together.
4. The new issue will have `times_seen` that is smaller than the amount of events currently retained, which is nonsense. So issuestream will show a higher count than issue details page does.

### What you expected to happen

`times_seen` on an issue should always be greater than or equal to the amount of events retained in ClickHouse, modulo temporary data inconsistencies.

### What probably happens under the hood

1. group `b` continues to get events and schedules debounced updates for `times_seen` and `last_seen` via buffers a couple mins into the future
2. group `b` is merged into `a`
3. buffers processes, and cannot find the group ID, incrs are discarded

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.