Skip to content

fix: [PIDM-1661] Helpdesk Cron OOM#171

Merged
gioelemella merged 16 commits intomainfrom
PIDM-1661-fix-helpdesk-cron-oom
Mar 24, 2026
Merged

fix: [PIDM-1661] Helpdesk Cron OOM#171
gioelemella merged 16 commits intomainfrom
PIDM-1661-fix-helpdesk-cron-oom

Conversation

@gioelemella
Copy link
Copy Markdown
Collaborator

@gioelemella gioelemella commented Mar 12, 2026

List of Changes

  • replace queryItems with readItem for CosmosDB point search
  • refactor massive operation logic to avoid to keep in memory large number of objects
  • added a limit to the number of processable item in one cron execution (MASSIVE_OPERATION_MAX_PROCESSABLE_ITEMS)
  • updated unit tests

Motivation and Context

PIDM-1661
Avoid Receipt Datastore pod failure for OOM on cron execution with large number of errors
Improve query performance and reduce RU consumption by switching from queryItems toreadItem for CosmosDB point search

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link
Copy Markdown
Contributor

@jacopocarlini jacopocarlini left a comment

Choose a reason for hiding this comment

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

@github-actions
Copy link
Copy Markdown

This PR exceeds the recommended size of 400 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@github-actions
Copy link
Copy Markdown

Comment this PR with update_code to update openapi.json and format the code. Consider to use pre-commit to format the code.

@sonarqubecloud
Copy link
Copy Markdown

@gioelemella gioelemella merged commit a40ccdd into main Mar 24, 2026
10 of 12 checks passed
@gioelemella gioelemella deleted the PIDM-1661-fix-helpdesk-cron-oom branch March 24, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants