Skip to content

Sort memory fix#38

Merged
felipemontoya merged 1 commit into
mainfrom
fmo/mem-sort
Jun 1, 2026
Merged

Sort memory fix#38
felipemontoya merged 1 commit into
mainfrom
fmo/mem-sort

Conversation

@felipemontoya
Copy link
Copy Markdown
Member

This PR fixes "Out of sort memory, consider increasing server sort buffer size"

Turns that mysql was loading the entire metadata field in the sort memory. Now it only does the create date and the ID

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the badge workflow session lookup to avoid MySQL sort-buffer exhaustion by preventing the large metadata column from being included in the sorted result set.

Changes:

  • Changes the session selection query to first fetch only the earliest matching session’s primary key (id).
  • Loads the full AIWorkflowSession row in a second step using the fetched PK.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/openedx_ai_badges/workflows/orchestrators.py
@felipemontoya felipemontoya merged commit 6f203be into main Jun 1, 2026
6 checks 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.

2 participants