potiuk commented on code in PR #38040:
URL: https://github.com/apache/airflow/pull/38040#discussion_r1520457952
##########
airflow/providers/google/cloud/transfers/postgres_to_gcs.py:
##########
@@ -112,7 +112,13 @@ def __init__(
self.cursor_itersize = cursor_itersize
def _unique_name(self):
- return f"{self.dag_id}__{self.task_id}__{uuid.uuid4()}" if
self.use_server_side_cursor else None
+ """
+ Generates a deterministic UUID for the cursor name,
+ using the combination of DAG ID and task ID.
+ """
+ if self.use_server_side_cursor:
+ return str(uuid5(uuid5(NAMESPACE_OID, self.dag_id), self.task_id))
Review Comment:
Hmm. You are right - but maybe it's enough to just use UUID1 and we are
done. I don't think we need dag_id, task_id, the probability of getting same
uuid is 1/ 2^128 = 3.4028237e+38
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]