Skip to content

Conversation

@MilanTyagi2004
Copy link

@MilanTyagi2004 MilanTyagi2004 commented Dec 19, 2025

Title: [#13415] Non-deterministic ordering in DB queries causes inconsistent API behavior and flaky tests

Fixes #13415

Outline of Solution

  • Enforce deterministic ordering on collection queries in the SQL layer
    (UsersDb, AccountRequestsDb, NotificationsDb, FeedbackSessionsDb, AccountsDb)
    using explicit ORDER BY.

  • Enforce deterministic ordering on Objectify/Datastore queries
    (StudentsDb, InstructorsDb, FeedbackSessionsDb, AccountsDb)
    via .order(...).

  • Remove redundant in-memory sorting in UsersLogic now that DB queries return
    ordered results.

@github-actions
Copy link

Hi @MilanTyagi2004, thank you for your interest in contributing to TEAMMATES!
However, your PR does not appear to follow our contribution guidelines:

  • Title must start with the issue number the PR is fixing in square brackets, e.g. [#<issue-number>]

Please address the above before we proceed to review your PR.

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.

Non-deterministic ordering in DB queries causes inconsistent API behavior and flaky tests

1 participant