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

server: server identity returns nodeID for system tenant #103148

Merged
merged 1 commit into from
May 23, 2023

Conversation

dhartunian
Copy link
Collaborator

Previously, the server identity object would hide the nodeID from identity objects that contained a set tenantID. This was done to create separation of concerns between a secondary tenant and the rest of the cluster. However, this identity is used in populating log payloads with contextual metadata. That led to #103112 due to the fact that the system tenant sets its tenantId to 1 which led to a hidden nodeID.

We now always emit the nodeID when the tenantID is set to the system tenant.

Fixes #103112

Release note (bug fix): 23.1.0 contained a bug where the node_id field would be omitted in logs. This fix restores that value.

@dhartunian dhartunian added the backport-23.1.x Flags PRs that need to be backported to 23.1 label May 11, 2023
@dhartunian dhartunian requested review from knz and a team May 11, 2023 23:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, the server identity object would hide the nodeID from
identity objects that contained a set tenantID. This was done to
create separation of concerns between a secondary tenant and the
rest of the cluster. However, this identity is used in populating log
payloads with contextual metadata. That led to cockroachdb#103112 due to the fact
that the system tenant sets its tenantId to 1 which led to a hidden
nodeID.

We now always emit the nodeID when the tenantID is set to the system
tenant.

Fixes cockroachdb#103112

Release note (bug fix): 23.1.0 contained a bug where the `node_id`
field would be omitted in logs. This fix restores that value.
@dhartunian
Copy link
Collaborator Author

bors r= aadityasondhi

@craig
Copy link
Contributor

craig bot commented May 23, 2023

Build failed:

@knz
Copy link
Contributor

knz commented May 23, 2023

failed on unrelated flake #103791

bors r=aadityasondhi

@craig
Copy link
Contributor

craig bot commented May 23, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented May 23, 2023

Build succeeded:

@craig craig bot merged commit e3b7e0c into cockroachdb:master May 23, 2023
2 checks passed
@dhartunian dhartunian deleted the restore-node-id-in-logs branch February 5, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

log: node_id field missing in log metadata
4 participants