rollout: add ordinals to rollout JSONL lines#31859
Draft
owenlin0 wants to merge 2 commits into
Draft
Conversation
03989c7 to
f04dbe7
Compare
89ed20b to
8c750e4
Compare
f04dbe7 to
77c3655
Compare
8c750e4 to
b70fee9
Compare
77c3655 to
132432a
Compare
b70fee9 to
c0b4b7a
Compare
132432a to
76fc070
Compare
c0b4b7a to
6a09208
Compare
76fc070 to
5bc52c8
Compare
6a09208 to
0d139e9
Compare
5bc52c8 to
5c059c3
Compare
0d139e9 to
ce5433a
Compare
5c059c3 to
be36b03
Compare
ce5433a to
fdc193c
Compare
be36b03 to
fb7b102
Compare
930e827 to
239e27c
Compare
404f923 to
a77e380
Compare
a77e380 to
3b1fd5b
Compare
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.
Description
This PR adds an optional integer
ordinalto each rollout JSONL line and emits them only forthread.history_mode = 'paginated'threads. Since we haven't started writing any yet, we can guarantee that all paginated threads are new rollouts and can start with ordinal 0. We don't have to deal with populating 0 in the middle of a rollout.For legacy rollouts, we don't write ordinals and leave it as
ordinal: None.Why
Ordinals give paginated rollout records a durable ordering position for later projection and thread forking optimizations. Having a monotonically increasing integer for an append-only log just makes a lot of sense and makes things downstream easier.