Skip to content

Conversation

@tbg
Copy link
Member

@tbg tbg commented May 18, 2023

Extracted from #99191.


There was this weird setup where we were hiding it in a callback.
Let's just call it directly.

This was masking that fatalling on the result is actually turned off except
when starting a Server (i.e. outside of pure unit tests). Now there's
an explicit variable on the options to opt into the fatal error.

Now we also call it only when we want to: we didn't actually want to call it
when dealing with blocking requests. It didn't hurt either since the blocking
requests didn't change the state of the tracker, but still - now we're only
checking when something has changed which is better.

Epic: None
Release note: None

There was this weird setup where we were hiding it in a callback.
Let's just call it directly.

This was masking that fatalling on the result is actually turned off except
when starting a `Server` (i.e. outside of pure unit tests). Now there's
an explicit variable on the options to opt into the fatal error.

Now we also call it only when we want to: we didn't actually want to call it
when dealing with blocking requests. It didn't hurt either since the blocking
requests didn't change the state of the tracker, but still - now we're only
checking when something has changed which is better.

Epic: None
Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg requested a review from aliher1911 May 18, 2023 13:26
@tbg tbg marked this pull request as ready for review May 18, 2023 14:10
@tbg tbg requested a review from a team as a code owner May 18, 2023 14:10
Copy link
Contributor

@aliher1911 aliher1911 left a comment

Choose a reason for hiding this comment

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

I think fatalling in callback makes sense if you treat rpc context as a library. You don't necessarily want library to terminate your process. But in this case it is sufficiently embedded with the rest of server and we also do it throughout the code.

@tbg
Copy link
Member Author

tbg commented May 19, 2023

Thanks Oleg!

bors r=aliher1911

@craig
Copy link
Contributor

craig bot commented May 19, 2023

Build succeeded:

@craig craig bot merged commit f2ff9b4 into cockroachdb:master May 19, 2023
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.

3 participants