Skip to content

Add a function to serialize MDBMinimalShard with a preset timestamp#796

Open
seanses wants to merge 1 commit intomainfrom
di/serialize-shard-without-timestamp
Open

Add a function to serialize MDBMinimalShard with a preset timestamp#796
seanses wants to merge 1 commit intomainfrom
di/serialize-shard-without-timestamp

Conversation

@seanses
Copy link
Copy Markdown
Collaborator

@seanses seanses commented Apr 13, 2026

To be used in https://github.com/huggingface-internal/xetcas/pull/1015


Note

Medium Risk
Touches shard serialization/footer metadata and changes serialize_impl call signatures, which could affect on-disk shard determinism and any callers relying on the previous timestamp behavior.

Overview
Adds support for deterministic shard serialization by allowing MDBMinimalShard to be serialized with a caller-provided creation timestamp.

serialize_impl now accepts an optional timestamp and uses it to populate MDBShardFileFooter.shard_creation_timestamp, while existing serialization paths continue to default to current_timestamp; a new serialize_with_timestamp API is added and existing serialize_* helpers are updated to pass the new parameter.

Reviewed by Cursor Bugbot for commit 687a9bc. Bugbot is set up for automated code reviews on this repo. Configure here.

@seanses seanses marked this pull request as ready for review April 14, 2026 00:30
Copy link
Copy Markdown
Collaborator

@hoytak hoytak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants