Serve the timeline's connection counts from a rollup once workspaces reach millions of events
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, sql, typescript
- Lĩnh vực
- backend, databases, performance
Hướng nghiên cứu
Start by reading the activity_event_daily_counts rollup and its statement-level triggers from #201, then the query behind timeline_connection_event_counts and the pgTAP cases in supabase/tests/database/21_timeline_connection_event_counts.test.sql. Decide between extending the rollup with connection_id/severity or adding a sibling rollup, and reconcile London filter days against UTC rollup days. Done means the unfiltered badge renders under 100 ms at 2.3M events with explain analyze on the PR and the pgTAP cases unchanged and passing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The timeline's connection badges (#245, PR #248) are counted by timeline_connection_event_counts, which aggregates the workspace's activity_events on every timeline render. With no filters, that reads every event the workspace keeps. Retention keeps 13 months (HISTORY_RETENTION_MONTHS in src/lib/jobs/retention.ts).
Measured with explain analyze on committed data in an isolated Postgres 17.11 container (the supabase/postgres:17.11.0.011 image, default settings):
| Workspace size | Filter | Execution time |
|---|---|---|
| 23,000 events (local demo) | none | 5.5 ms |
| 2.3 million events (#191 scale, 13 months) | none | 134 to 148 ms |
| 2.3 million events | severity critical | 88 ms |
| 2.3 million events | last 30 days | 54 ms |
| 2.3 million events | one day | 1 ms |
The unfiltered case at #191 scale is over the 100 ms interactive read budget. #245 accepted this, because no workspace is near that size today. This issue holds the follow-up.
Scope
- Extend the
activity_event_daily_countsrollup (#201) withconnection_idandseverity, or add a sibling rollup, kept by the same statement-level triggers. - Serve the badges from the rollup when the filters allow it: no date filter, or whole days. The timeline's date filter uses London days and the rollup uses UTC days, so a filtered window that does not line up with UTC days still needs the live table, or a London-day rollup.
- Keep the rule that a badge counts exactly what the timeline lists. Reuse the
supabase/tests/database/21_timeline_connection_event_counts.test.sqlcases against the new path.
Acceptance criteria
- The unfiltered badges for a 2.3 million event workspace render under 100 ms (explain analyze quoted on the PR).
- The counts are unchanged for every filter combination covered by the pgTAP test.
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 1
- Merge trung bình
- 6 giờ 56 phút
- Pull request đã merge (30 ngày)
- 136
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eddiejaoude/StackDash
-
area: docs documentation priority: P3 size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eddiejaoude/StackDash#462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: web bug priority: P3 size: XS
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
eddiejaoude/StackDash#432 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: database bug priority: P3 size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eddiejaoude/StackDash#419 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: docs bug priority: P2 size: XS
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
eddiejaoude/StackDash#418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility area: timeline bug priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
eddiejaoude/StackDash#389 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eddiejaoude/StackDash
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
open-webui/tether#52 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`void platform install --app-access public` fails when Cloudflare reports Access is disabledĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/void#835 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AykutSarac/jsoncrack.com#616 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melgarafael/DeskcommCRM#4679 ·
Maintainer thường phản hồi trong vòng 1 ngày