ashb commented on a change in pull request #12327:
URL: https://github.com/apache/airflow/pull/12327#discussion_r524024672



##########
File path: docs/concepts.rst
##########
@@ -793,6 +793,12 @@ to a class that is subclass of 
:class:`~airflow.models.xcom.BaseXCom`. To alter
 deserialization mechanism the custom class should override ``serialize_value`` 
and ``deserialize_value``
 methods.
 
+It is also possible to override the ``orm_deserialize_value`` method which is 
used for deserialization when
+recreating ORM XCom object. This happens every time we query the XCom table, 
for example when we want to populate
+XCom list view in webserver. By default Airflow will use 
``BaseXCom.orm_deserialize_value`` method which returns the
+value stored in Airflow database. In this way Airflow is avoiding unnecessary 
requests that may occur in custom
+``deserialize`` methods of custom XCom backend.

Review comment:
       ```suggestion
   value stored in Airflow database. If your XCom backend performs expensive 
operations, or has
   large values that aren't useful to show in such a view, override this method 
to provide an
   alternative representation.
   ```

##########
File path: docs/concepts.rst
##########
@@ -793,6 +793,12 @@ to a class that is subclass of 
:class:`~airflow.models.xcom.BaseXCom`. To alter
 deserialization mechanism the custom class should override ``serialize_value`` 
and ``deserialize_value``
 methods.
 
+It is also possible to override the ``orm_deserialize_value`` method which is 
used for deserialization when
+recreating ORM XCom object. This happens every time we query the XCom table, 
for example when we want to populate
+XCom list view in webserver. By default Airflow will use 
``BaseXCom.orm_deserialize_value`` method which returns the
+value stored in Airflow database. In this way Airflow is avoiding unnecessary 
requests that may occur in custom
+``deserialize`` methods of custom XCom backend.

Review comment:
       Just this @turbaszek Then :+1:




----------------------------------------------------------------
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:
[email protected]


Reply via email to