Repository navigation
The retry mutation binds its DateTime64 from integer epoch milliseconds, not timestamp() * 1000 - #153
Merged
Merged
Conversation
…) * 1000 memory.extraction_retry_mine updates the failed rows' updated_at through a bound millisecond value (a replicated table refuses now64() in a mutation). It built that value as int(_now().timestamp() * 1000) — the exact spelling the version-unit gate (test_rmt_version_unit) refuses in server code, since a ReplacingMergeTree version built in milliseconds never wins against the nanosecond ones; main has been red on that test since the op landed. The value is a timestamp, not a version, so the fix is the expression: server.core.datetimes.epoch_ms turns an aware or naive-UTC datetime into whole milliseconds since the epoch with integer arithmetic, and the mutation binds that. Signed-off-by: pufit <[email protected]>
Merged
…th the module's Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
…d_ms Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
…the stored updated_at Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
One caller does not need a helper; the read-back test pins the stored value. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #152
Changelog category (leave one):
Why
mainis red attests/unit/test_rmt_version_unit.py::test_no_writer_builds_a_millisecond_versionsincefae8ccf8(thememory.extraction_status_mine/extraction_retry_minemerge, whose own CI run on main was cancelled, so it went unseen until the next pull request ran the suite: https://github.com/ClickHouse/loom/actions/runs/40183629842/job/121139733973).The gate refuses
timestamp() * 1000anywhere underserver/, because a ReplacingMergeTree version built in milliseconds never wins against the nanosecond ones. The flagged line in_submit_retryis not a version: it is the bound millisecond value the retry mutation turns intoupdated_atwithfromUnixTimestamp64Milli(a replicated table refusesnow64()in a mutation). The spelling is what the gate objects to, so the fix is the expression, not the gate.Scope and risk
_submit_retrybinds(_now() - UNIX_EPOCH) // timedelta(milliseconds=1): whole milliseconds by integer arithmetic, no float rounding. Same parameter, same SQL, same clock seam (_now), so tests that pin the module's time still do.server.core.datetimes.UNIX_EPOCHis the one tz-aware epoch; the private copies inextraction_queue,usage_fold,status_storeandtasks.app.commonread it. The naivedatetime(1970, 1, 1)copies stay as they are.Compatibility, rollout and rollback
Tests
test_retry_changes_only_the_principals_failed_rows_in_scopepins the clock and reads back the storedupdated_at, truncated to the millisecond (clickhouse-local).test_rmt_version_unit.py,test_extraction_retry_mine.py,test_extraction_retry_erasure.pypass locally; ruff, mypy-gate and function-length-gate pass.