Skip to content

docs: keep activityRelations as one unpartitioned table for now - #5350

Merged
themarolt merged 2 commits into
mainfrom
docs/issue-821-activity-relations-storage-adr
Nov 15, 2026
Merged

themarolt merged 2 commits into
mainfrom
docs/issue-821-activity-relations-storage-adr

Conversation

@themarolt

Copy link
Copy Markdown
Contributor

Summary

Records the storage decision for activityRelations from epic linuxfoundation/lfx-cdp-insights-ops#821: keep it as one unpartitioned table for now. The duplicate cleanup (#852), the NULL-channel unique index (#1114), the first VACUUM and the data-sink-worker speedups removed the load that made partitioning look necessary.

Changes

  • docs/adr/0039-keep-activity-relations-unpartitioned.md:
    • Context: current size (about 1.02B rows, 293 GB heap, 448 GB indexes) and growth since March 2026 (about 25M rows a month).
    • Decision: one table, no partitioning or archiving migration now.
    • Alternatives rejected: partitioning by time or by segment, and archiving.
    • Consequences and risks: autovacuum on a table this size, a growth threshold to revisit at, and unused indexes to review first.
  • docs/adr/README.md: index row for ADR-0039.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Performance improvement
  • Chore / dependency update
  • Documentation

Related issue

Refs linuxfoundation/lfx-cdp-insights-ops#821

Copilot AI balanced review requested due to automatic review settings November 15, 2026 17:48
@cursor

cursor Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only change with no runtime, schema, or deployment impact.

Overview
Adds ADR-0039, documenting that activityRelations stays a single unpartitioned Postgres table for now and that partitioning or archiving is deferred until growth or latency warrants revisiting.

The ADR captures size/growth context, why time-, segment-, and archive-based options were rejected, and operational risks (autovacuum, ~50M rows/month growth trigger, redundant indexes). docs/adr/README.md is updated with an index row for the new accepted ADR.

Reviewed by Cursor Bugbot for commit 672bb2c. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The documentation changes appear safe to merge.

Summary

Records the decision to keep activityRelations unpartitioned for now.

  • The ADR records why activityRelations stays one unpartitioned table for now.

The previous finding is fixed. No new actionable issues were found.

Reviews (2) · Last reviewed commit: "docs: qualify issue links and correct th..." · Reviewed by Greptile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The ADR needs explicit links to the correct issue tracker and a corrected partitioning rationale that distinguishes existing dedup index columns from the separate primary-key constraint.

2 open issues
What changed in this PR

Records the decision to keep PostgreSQL’s activityRelations table unpartitioned for now, following cleanup, maintenance and ingestion improvements. This is documentation-only; no schema or runtime behavior changes.

Changes:

  • Adds ADR-0039 with table size, growth estimates and reasons for deferring partitioning or archiving.
  • Documents maintenance risks, index-review opportunities and conditions for revisiting the decision.
  • Registers the accepted ADR in the index.
File Description
docs/​adr/​README.md Adds the ADR-0039 index entry.
docs/​adr/​0039-keep-activity-relations-unpartitioned.md Records the storage decision, alternatives, consequences and revisit criteria.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 15, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The storage decision depends on production growth, latency, and VACUUM evidence that cannot be verified from the checkout or inaccessible private epic, requiring confirmation by a database owner.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@themarolt
themarolt merged commit 45d61c4 into main Nov 15, 2026
14 checks passed
@themarolt
themarolt deleted the docs/issue-821-activity-relations-storage-adr branch November 15, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants