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

the end date is set to 1st of next month as the upperbound is excluded #170

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

acn-dgopa
Copy link
Member

Description

  • the end date is set to 1st of next month as the upperbound is excluded
  • also a new tabl version is created to avoid overlapping confusion with the existing partitions with different dateranges

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@acn-dgopa acn-dgopa requested a review from Alxandr December 8, 2024 20:10
@Alxandr
Copy link
Contributor

Alxandr commented Dec 9, 2024

Wait, why are we making v2 of the table?

@acn-dgopa
Copy link
Member Author

Wait, why are we making v2 of the table?

The existing partition december has date range until 05 january in production, 11 in AT environments. We cannot change the partition range without removing them which means data will be lost. So data has to be any way migrated. So my plan here is to create new table and partitions with monthly date range and migrate the data from v1 to v2. Probably this is not very optimal solution. Any thoughts?

@acn-dgopa acn-dgopa linked an issue Dec 9, 2024 that may be closed by this pull request
@Alxandr
Copy link
Contributor

Alxandr commented Dec 9, 2024

https://www.enterprisedb.com/blog/altering-bounds-partition - rather than using a migration to create v2, use one to alter the bounds (if the table exists).

@acn-dgopa
Copy link
Member Author

acn-dgopa commented Dec 9, 2024

https://www.enterprisedb.com/blog/altering-bounds-partition - rather than using a migration to create v2, use one to alter the bounds (if the table exists).

i think then i have to run the db scripts manually as they are different startdates for the december partition across the environments. Also, i tried this and its not possible to change the lower bound as the data is already in there. I'm able to update the upperbound for december as the data does not exist yet for the upper bound

@acn-dgopa
Copy link
Member Author

The script is run manuallly in all the evironments to alter the parition ranges.

@acn-dgopa acn-dgopa merged commit d5d8871 into main Dec 16, 2024
6 checks passed
@acn-dgopa acn-dgopa deleted the feature/update-daterange branch December 16, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auditlog: Overlapping partitions error lead to container crash
2 participants