gyli commented on code in PR #55216:
URL: https://github.com/apache/airflow/pull/55216#discussion_r2320764365
##########
airflow-core/src/airflow/models/trigger.py:
##########
@@ -390,6 +390,142 @@ def get_sorted_triggers(cls, capacity: int,
alive_triggerer_ids: list[int] | Sel
return result
+class TriggerWatermark(Base):
+
+ __tablename__ = "trigger_watermark"
+
+ id = Column(Integer, primary_key=True, autoincrement=True)
+
+ # Leverage the
+ trigger_hash = Column(
+ String(length=1500).with_variant(
+ String(
+ length=1500,
+ # latin1 allows for more indexed length in mysql
+ # and this field should only be ascii chars
+ collation="latin1_general_cs",
+ ),
+ "mysql",
+ ),
+ nullable=False,
+ )
Review Comment:
I think it's using existing code
[here](https://github.com/gyli/airflow/blob/main/airflow-core/src/airflow/models/asset.py#L156)
as the example.
However, unlike asset URI, I think we should allow UTF8 char for column
`key` and `value`. Both the watermark name and value can be any string that
goes beyond the latin1 range.
--
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]