_job_start_time records the populating host's local time, with no zone
メンテナーはふだん 1 日以内に返信
@dimitri-yatsenko がすでに取り組んでいます。
2026年10月12日 から。
評価
この issue はまだ評価されていません。
説明
populate() stores _job_start_time as naive local time on whichever host runs it: start_time = time.time() (autopopulate.py:665), then written as datetime.datetime.fromtimestamp(start_time) (autopopulate.py:742). Two hosts in different time zones write different values for the same instant, and nothing in the row records which zone applies. A populate() run from a laptop in US Central and one from a worker in UTC leave start times five hours apart for computations that ran at the same moment.
The other timestamps the framework writes use a known clock:
_prov.timeis UTC:datetime.datetime.now(datetime.timezone.utc).isoformat()(provenance.py:103).- The job table's
completed_timeis the server'sCURRENT_TIMESTAMP(jobs.py:499,529).
A reader cannot place _job_start_time on either of those scales unless every host that populates the schema runs in the same zone.
Proposal
- Take
_job_start_timefrom the server's clock, as the job table already does forcompleted_time(jobs.py:498-499) andscheduled_time(jobs.py:388). Compute it in theUPDATEthat already writes the hidden columns (autopopulate.py:874), as the server's current time minus_job_duration. That adds no round trip, and every host that populates the schema then writes on one clock, whatever zone the host runs in. - The server expression must be statement time, not transaction time:
NOW(3)on MySQL, andstatement_timestamp()on PostgreSQL, whereCURRENT_TIMESTAMPis the start of the transaction. It belongs in the adapter, besidecurrent_user_expr(). - Keep measuring
_job_durationon the worker. It is a difference of two readings on one clock, so neither zone nor skew affects it. TheUPDATEruns after the commit that_job_durationalready includes, so the derived start is late by the one-way latency of that statement, which is the same error a separateSELECTat start would carry. - State in
job-metadata.md(datajoint-docs) that_job_start_timeuses the server's clock from the release that ships the change, and that rows written earlier carry the populating host's local time. Those rows cannot be corrected after the fact, because the zone was never recorded.
- 主要言語
- Python
- スター
- 197
- フォーク
- 99
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
datajoint/datajoint-python のほかの issue
-
MySQL error 1143 (column-level SELECT denied) is not translated to AccessError対応中かも @Bhanu73120 が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
datajoint/datajoint-python#1586 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
datajoint/datajoint-python#1581 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
datajoint/datajoint-python#1539 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Environment variables lose to datajoint.json for settings missing from ENV_VAR_MAPPING対応中かも @dimitri-yatsenko が 2 日前に担当しました。 オープン
datajoint/datajoint-python#1585 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
database.name should namespace schema names on MySQL, as it does on PostgreSQL対応中かも @dimitri-yatsenko が 5 日前に担当しました。 オープンfeature
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
datajoint/datajoint-python#1582 ·
メンテナーはふだん 1 日以内に返信
datajoint/datajoint-python の issue をすべて見る
似ている issue
-
fix formatting of the sample database page of the docs対応中かも @Aaqibhafeezkhan が今日担当しました。 オープンdocumentation good first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
chaoss/CollectOSS#544 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/plugin good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
kestra-io/plugin-soda#137 ·
-
難易度 2/5 半日 初心者へのやさしさ 62/100
ibm-granite/granite.build#504 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信