Skip to content
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

Merged

Conversation

nvanbenschoten
Copy link
Member

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

@nvanbenschoten nvanbenschoten requested a review from a team as a code owner August 20, 2023 05:57
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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
@nvanbenschoten nvanbenschoten force-pushed the nvanbenschoten/lockTableKeyUUID branch from 7568929 to 9adda04 Compare August 20, 2023 17:51
@nvanbenschoten nvanbenschoten requested a review from a team August 20, 2023 17:51
@nvanbenschoten nvanbenschoten requested a review from a team as a code owner August 20, 2023 17:51
Copy link
Collaborator

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1, 8 of 8 files at r2, all commit messages.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @nvanbenschoten)

@nvanbenschoten
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 21, 2023

Build failed (retrying...):

@nvanbenschoten
Copy link
Member Author

Bors failed on #109158, which is fixed by #109159. Leaving in the queue.

@craig
Copy link
Contributor

craig bot commented Aug 21, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Aug 21, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Aug 21, 2023

Build succeeded:

@craig craig bot merged commit ceccd41 into cockroachdb:master Aug 21, 2023
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten/lockTableKeyUUID branch August 22, 2023 02:55
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