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

Do not create export register when Instance is saved #2760

Merged
merged 13 commits into from
Jan 17, 2025

Conversation

kelvin-muchiri
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri commented Jan 16, 2025

Changes / Features implemented

Creating a register if it does not exist when an Instance is saved resulted in a bloated queue and load on the database from traversing all submissions for a XForm.

Instances under which we should create the register:

  1. When a new form is published
  2. When a CSV export is triggered and the register does not exist.

Steps taken to verify this change does what is intended

  • QA

Side effects of implementing this change

Prevents the queue and database from becoming bloated with requests to traverse all submissions for a form to build the export register when a Instance is saved.

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #

creating a register if it does not exist when an Instance is saved resulted in some performance problems. This change ensures the only time we create a new register if it does not exist is when a CSV export is triggred
@kelvin-muchiri kelvin-muchiri marked this pull request as draft January 16, 2025 08:50
@kelvin-muchiri kelvin-muchiri marked this pull request as ready for review January 16, 2025 09:06
FrankApiyo
FrankApiyo previously approved these changes Jan 16, 2025
ukanga
ukanga previously approved these changes Jan 16, 2025
@kelvin-muchiri kelvin-muchiri dismissed stale reviews from ukanga and FrankApiyo via 08ddc05 January 16, 2025 09:33
ukanga
ukanga previously approved these changes Jan 16, 2025
@kelvin-muchiri kelvin-muchiri enabled auto-merge (squash) January 17, 2025 06:44
@kelvin-muchiri kelvin-muchiri merged commit c61398a into main Jan 17, 2025
9 checks passed
@kelvin-muchiri kelvin-muchiri deleted the enhance-repeat-register branch January 17, 2025 06:45
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.

3 participants