Skip to content

Conversation

@tdeebswihart
Copy link
Contributor

What changed?

I changed our RunID generation to use UUIDv7 instead of V4 by default.

Why?

UUIDv7s have a timestamp as their prefix, which will help us optimize the physical storage layout of our workflow-related data.

How did you test it?

Existing tests

Potential risks

I don't believe there are any

Documentation

Not necessary.

Is hotfix candidate?

No

@tdeebswihart tdeebswihart requested a review from a team as a code owner December 4, 2024 20:01
@tdeebswihart tdeebswihart requested a review from yiminc December 4, 2024 22:20
// It returns the creationContext which can later be used to insert into the executions table.
func (s *Starter) prepareNewWorkflow(workflowID string) (*creationParams, error) {
runID := uuid.NewString()
runUUID, err := uuid.NewV7()
Copy link
Member

Choose a reason for hiding this comment

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

shall we use primitives.NewUUID() then?

@tdeebswihart tdeebswihart enabled auto-merge (squash) December 6, 2024 03:05
@tdeebswihart tdeebswihart merged commit 17ae9bc into main Dec 6, 2024
49 checks passed
@tdeebswihart tdeebswihart deleted the tds/uuidv7-runid branch December 6, 2024 03:20
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.

4 participants