-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: use uuid.UUID
for LockTableKey.TxnUUID
#109091
storage: use uuid.UUID
for LockTableKey.TxnUUID
#109091
Conversation
The options struct had been separated from its one and only use. Code movement. Epic: None Release note: None
This commit changes `LockTableKey.TxnUUID` from a `[]byte` to a `uuid.UUID`. The field was a byte slice "to avoid copying a slice when decoding". This reasoning did not make much sense though, because the uuid slice was only 16 bytes in size. A slice header is 24 bytes, so using a uuid results in less copying. This is all presumably negligible though, so we make this change to make LockTableKey easier to work with. Epic: None Release note: None
7568929
to
9adda04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 8 of 8 files at r2, all commit messages.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @nvanbenschoten)
TFTR! bors r+ |
Build failed (retrying...): |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
This commit changes
LockTableKey.TxnUUID
from a[]byte
to auuid.UUID
.The field was a byte slice "to avoid copying a slice when decoding". This reasoning did not make much sense though, because the uuid slice was only 16 bytes in size. A slice header is 24 bytes, so using a uuid results in less copying. This is all presumably negligible though, so we make this change to make LockTableKey easier to work with.
Epic: None
Release note: None