Copilot 5057f29efc
Fix alert events ordering to show latest events first (#22309)
* Initial plan

* Initial analysis: identify ordering issue in alert events

Co-authored-by: harshach <38649+harshach@users.noreply.github.com>

* Fix PostgreSQL query ordering in listAllEventsWithStatuses

Co-authored-by: harshach <38649+harshach@users.noreply.github.com>

* Add comprehensive test coverage and performance indexes for event ordering

- Add CollectionDAOEventOrderingTest with 4 comprehensive test methods
- Test chronological ordering, pagination, edge cases, and cross-database consistency
- Add critical timestamp indexes for consumers_dlq and successful_sent_change_events tables
- Indexes prevent table scans on ORDER BY timestamp DESC queries
- Migration 1.9.1 includes both MySQL and PostgreSQL index definitions

Addresses performance concerns and test coverage gaps identified in PR review.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix tests

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harshach <38649+harshach@users.noreply.github.com>
Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Sriharsha Chintalapani <harsha@getcollate.io>
Co-authored-by: Teddy <teddy.crepineau@gmail.com>
2025-07-31 13:31:53 +02:00
..
2024-08-06 18:41:37 +05:30
2024-09-30 23:39:27 +05:30
2025-01-28 19:22:33 +05:30
2025-07-31 06:38:21 +02:00
2025-07-31 06:38:21 +02:00
2025-07-31 06:38:21 +02:00