-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Rotate fernet key optimisation #40758
Conversation
…. It's been observed that some users store additional data in `variable` table which is leading to memory issues during the operation. To be consistent across the tables added batching for all of them.
NIT: Can we extract it to a constant value ? |
This reverts commit 6e604f6.
Hey @bjankie1 -> we need to revert that one. Our canary builds detected that That's why I revert it for now in #40769 I think we still need to do a conditional work on those queries. We already have in airflow/sqlalchemy_utils:
(so it should be redone with it). |
Thanks. I'll redo it with the condition suggested. |
* Batch processing of fernet key rotation to avoid loading entire table. It's been observed that some users store additional data in `variable` table which is leading to memory issues during the operation. To be consistent across the tables added batching for all of them. * Extracted batch size to a constant --------- Co-authored-by: bjankiewicz <bjankiewicz@google.com>
This reverts commit 6e604f6.
Current implementation of Fernet key rotation implicitly executes
all()
method on the processed tables leading to loading all rows to memory.It's been observed that some users store additional data in
variable
table which is leading to memory issues during the operation.This change introduces batch processing of fernet key rotation to avoid it. To be consistent across the tables (
variable
,connection
,trigger
) the batching operation was added for all of them.