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

util/mon: re-enable assertion about short-living monitors #125004

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

yuzefovich
Copy link
Member

This commit addresses a couple of issues that were identified when we enabled the assertion that all short-living monitors have been stopped when their parent is stopped:

  • we need to stop the in-memory temp storage disk monitor only in single-tenant deployments (due to the same reason for why we don't stop root SQL memory monitor there - there is a race around ungraceful shutdown of the server)
  • we need to mark kvFeed memory monitor as long-living similar to how other monitors used by CDC.

Fixes: #124848.

Release note: None

This commit addresses a couple of issues that were identified when we
enabled the assertion that all short-living monitors have been stopped
when their parent is stopped:
- we need to stop the in-memory temp storage disk monitor only in
single-tenant deployments (due to the same reason for why we don't stop
root SQL memory monitor there - there is a race around ungraceful
shutdown of the server)
- we need to mark `kvFeed` memory monitor as long-living similar to how
other monitors used by CDC.

Release note: None
@yuzefovich yuzefovich requested review from michae2 and DrewKimball June 3, 2024 20:31
@yuzefovich yuzefovich requested review from a team as code owners June 3, 2024 20:31
@yuzefovich yuzefovich requested review from rharding6373 and removed request for a team June 3, 2024 20:31
Copy link

blathers-crl bot commented Jun 3, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@yuzefovich yuzefovich removed the request for review from rharding6373 June 3, 2024 20:31
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@DrewKimball DrewKimball 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 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @michae2)

Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

:lgtm: Nice find!

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

@yuzefovich
Copy link
Member Author

TFTRs!

bors r+

@craig craig bot merged commit e4c1bbf into cockroachdb:master Jun 4, 2024
22 checks passed
@yuzefovich yuzefovich deleted the mon-assertion branch June 4, 2024 00:35
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.

sql: short-living non-stopped monitors on ungraceful shutdown
4 participants