Skip to content

fix: resolve issues #73, #75, #79 (indexes, notifications, event filtering) - #127

Merged
Xhristin3 merged 1 commit into
XStreamRollz:mainfrom
solomon35-stack:fix/issues-73-75-79
May 16, 2026
Merged

fix: resolve issues #73, #75, #79 (indexes, notifications, event filtering)#127
Xhristin3 merged 1 commit into
XStreamRollz:mainfrom
solomon35-stack:fix/issues-73-75-79

Conversation

@solomon35-stack

Copy link
Copy Markdown
Contributor

Summary

Fixes three open issues assigned to @solomon35-stack.

#73 — Add indexes for common query patterns

  • idx_streams_user_id_status on streams(user_id, status) for dashboard queries
  • idx_stream_events_stream_id_occurred_at on stream_events(stream_id, created_at DESC) for history queries
  • idx_users_email unique index on users(email) for auth lookups
  • Rollback: DROP INDEX statements noted in schema comments

#75 — Add notifications table

  • Columns: id, user_id (FK → users), type, payload (JSONB), read_at, created_at
  • idx_notifications_user_id for general user lookups
  • idx_notifications_unread partial index (WHERE read_at IS NULL) for unread-count queries
  • Rollback: DROP TABLE notifications noted in schema comments

#79 — Configurable event filtering

  • New EventFilter class in xstreamroll-processing/src/pipeline/
  • Per-stream block-list of event types loaded via setConfig(streamId, config)
  • Filtered events are dropped silently (no dead-letter)
  • Hot-reloadable: call setConfig at any time without restarting the worker
  • Wired into the worker poll loop before events are routed to sessions

Testing

  • TypeScript compiles clean (tsc --noEmit)

Closes #73, #75, #79

- XStreamRollz#73: add composite indexes on streams(user_id, status),
  stream_events(stream_id, created_at DESC), and users(email)
- XStreamRollz#75: add notifications table with user_id FK, JSONB payload,
  read_at, and partial index for unread-count queries
- XStreamRollz#79: add EventFilter class in pipeline/ with hot-reloadable
  per-stream block-list; wire into worker poll loop
@Xhristin3
Xhristin3 merged commit 9035b89 into XStreamRollz:main May 16, 2026
1 check passed
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.

[database] Add indexes for common query patterns

2 participants