You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/12/12 21:03:00 UTC

[jira] [Commented] (AIRFLOW-5463) Variable set is not atomic

    [ https://issues.apache.org/jira/browse/AIRFLOW-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16995079#comment-16995079 ] 

ASF GitHub Bot commented on AIRFLOW-5463:
-----------------------------------------

robobario commented on pull request #6807: [AIRFLOW-5463] Use same session to delete and add variable in set
URL: https://github.com/apache/airflow/pull/6807
 
 
   Why:
   * In our system we had a postgres connection error during Variable.set
   resulting in the variable being deleted. The intention of this change is
   that an error should leave the variable unchanged.
   
   https://issues.apache.org/jira/browse/AIRFLOW-5463
   
   ### Tests
   
   I was unable to see a good way to test this, is there a way to make delete succeed and add error? You could consider it a refactoring since the variable tests continue to pass.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Variable set is not atomic
> --------------------------
>
>                 Key: AIRFLOW-5463
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5463
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: core, models
>    Affects Versions: 1.10.5
>            Reporter: Cedrik Neumann
>            Priority: Major
>
> The function \{{Variable.set}} deletes the variable first
> [https://github.com/apache/airflow/blob/1.10.5/airflow/models/variable.py#L137]
> although it doesn't pass the DB session as an argument, thus delete and add don't run in an atomic operation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)