Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Merge Category Option Combo [DHIS2-18321] #19488

Open
wants to merge 46 commits into
base: master
Choose a base branch
from

Conversation

david-mackessy
Copy link
Contributor

@david-mackessy david-mackessy commented Dec 16, 2024

Feature

Adds a new feature, which allows the merging of CategoryOptionCombos.

Extracted the handling of merging DataValues into a common handler class as this is used by multiple merge types (DataElement & CategoryOptionCombo).

Testing

Automated

Tests added for

  • new store methods
  • integration tests for each merging/handling of metadata/data type
  • E2E tests

Docs

PR - dhis2/dhis2-docs#1466

@david-mackessy david-mackessy changed the title Dhis2 18321 feat: Merge Category Option Combo [DHIS2-18321] Dec 16, 2024
@david-mackessy david-mackessy marked this pull request as ready for review December 18, 2024 09:07
* @param uids {@link CategoryOptionCombo} {@link UID}s
* @return {@link Event}s with references to {@link CategoryOptionCombo} {@link UID} passed in
*/
List<Event> getAllByAttributeOptionCombo(Collection<UID> uids);
Copy link
Member

Choose a reason for hiding this comment

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

Just checking, have we considered the performance and memory use here? Is it possible that the arguments will include the default option combo, and then get millions of events returned, leading to OOM?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Do you think we should reject merge requests if they include the default cat option combo? It probably doesn't make sense if the default is part of a merge does it? I know some systems have multiple defaults, so we would only consider our own default that we set.
I will also post this question in the Jira issue for others too.

Copy link
Member

Choose a reason for hiding this comment

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

Understand. I think for the org unit merge we use HQL/SQL for the merge? I think for large databases with 10m+ events there may be no other choice.

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.

4 participants