Skip to content

refactor(entities): use TypeID#340

Open
vm-001 wants to merge 1 commit into
mainfrom
refactor/uuidv7
Open

refactor(entities): use TypeID#340
vm-001 wants to merge 1 commit into
mainfrom
refactor/uuidv7

Conversation

@vm-001
Copy link
Copy Markdown
Collaborator

@vm-001 vm-001 commented May 11, 2026

Summary

KSUID (K-Sortable Unique IDentifier) consists of a 32-bit timestamp and a 128-bit random payload. The timestamp only provides second precision, which can have severe Database page splitting during high-concurrency insertion.

This PR uses TypeID (a variant of UUIDv7) as entity IDs to mitigate page splitting and improve insertion performance.

References

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
integration 76.61% <100.00%> (+0.02%) ⬆️
integration-o11 39.18% <50.00%> (+0.03%) ⬆️
unit 16.85% <30.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
admin/api/endpoints.go 88.23% <100.00%> (ø)
admin/api/events.go 91.04% <100.00%> (ø)
admin/api/plugins.go 90.62% <100.00%> (ø)
admin/api/sources.go 83.33% <100.00%> (ø)
admin/api/workspaces.go 80.95% <100.00%> (ø)
db/migrator/migrator.go 77.89% <100.00%> (ø)
dispatcher/dispatcher.go 80.68% <100.00%> (ø)
pkg/declarative/types.go 93.33% <100.00%> (ø)
pkg/uid/uid.go 100.00% <100.00%> (ø)
proxy/gateway.go 87.00% <100.00%> (ø)
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vm-001 vm-001 force-pushed the refactor/uuidv7 branch 4 times, most recently from 0816217 to 22e2a55 Compare May 18, 2026 07:53
@vm-001 vm-001 force-pushed the refactor/uuidv7 branch from 22e2a55 to 42ed64d Compare May 19, 2026 07:42
@vm-001 vm-001 changed the title refactor(id): UUID v7 refactor(entities): use TypeID May 19, 2026
@vm-001 vm-001 force-pushed the refactor/uuidv7 branch from 42ed64d to 5b7e757 Compare May 19, 2026 08:07
@@ -0,0 +1,29 @@
ALTER TABLE "attempt_details"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

COLLATE C ?

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.

2 participants