Skip to content

server: server identity returns nodeID for system tenant#103148

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:restore-node-id-in-logs
May 23, 2023
Merged

server: server identity returns nodeID for system tenant#103148
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:restore-node-id-in-logs

Conversation

@dhartunian
Copy link
Copy Markdown
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 PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only label May 11, 2023
@dhartunian dhartunian requested review from a team and knz May 11, 2023 23:35
@cockroach-teamcity
Copy link
Copy Markdown
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 dhartunian force-pushed the restore-node-id-in-logs branch from 61290f5 to 4148b58 Compare May 12, 2023 15:09
@dhartunian
Copy link
Copy Markdown
Collaborator Author

bors r= aadityasondhi

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 23, 2023

Build failed:

@knz
Copy link
Copy Markdown
Contributor

knz commented May 23, 2023

failed on unrelated flake #103791

bors r=aadityasondhi

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 23, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 23, 2023

Build succeeded:

@craig craig bot merged commit e3b7e0c into cockroachdb:master May 23, 2023
@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 PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

log: node_id field missing in log metadata

4 participants