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,sql: add status server endpoint to request profiler details #109782

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

adityamaru
Copy link
Contributor

This change introduces a new status server endpoint to
request job profiler details. This endpoint will redirect
the request to the current coordinator node of the job in
question. This will be useful because in a followup we will
load the resumer from the coordinator node's job registry
and trigger its specific job profiler detail collection logic.

This is the first step of a few to move to a "fetch model" rather
than have each resumer dump their execution details at some
arbitrary cadence.

The core logic involved in collecting profiler details has not changed,
it has been moved in its entirety from pkg/sql to pkg/server. The
crdb_internal.request_job_execution_details builtin now resolves
the job's coordinator ID and calls the new status server endpoint.

Informs: #109671
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@adityamaru adityamaru force-pushed the move-to-resumer-model branch from 7176157 to 21702a5 Compare September 1, 2023 15:52
@adityamaru adityamaru requested review from dt and stevendanna September 1, 2023 15:53
@adityamaru adityamaru marked this pull request as ready for review September 1, 2023 15:53
@adityamaru adityamaru requested review from a team as code owners September 1, 2023 15:53
@adityamaru adityamaru requested a review from a team September 1, 2023 15:53
@adityamaru adityamaru requested review from a team as code owners September 1, 2023 15:53
@adityamaru adityamaru requested review from abarganier and removed request for a team September 1, 2023 15:53
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
Server: &TestingKnobs{
DialNodeCallback: func(ctx context.Context, nodeID roachpb.NodeID) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if there is an easier way to check that a particular node was dialed and returned us the response i'm all ears, i looked around but couldn't find any

@adityamaru adityamaru force-pushed the move-to-resumer-model branch from 21702a5 to 7e6c795 Compare September 1, 2023 16:42
This change introduces a new status server endpoint to
request job profiler details. This endpoint will redirect
the request to the current coordinator node of the job in
question. This will be useful because in a followup we will
load the resumer from the coordinator node's job registry
and trigger its specific job profiler detail collection logic.

This is the first step of a few to move to a "fetch model" rather
than have each resumer dump their execution details at some
arbitrary cadence.

The core logic involved in collecting profiler details has not changed,
it has been moved in its entirety from pkg/sql to pkg/server. The
`crdb_internal.request_job_execution_details` builtin now resolves
the job's coordinator ID and calls the new status server endpoint.

Informs: cockroachdb#109671
Release note: None
@adityamaru adityamaru force-pushed the move-to-resumer-model branch from 7e6c795 to a99de9f Compare September 5, 2023 18:34
@adityamaru
Copy link
Contributor Author

flake looks like #109240

@adityamaru
Copy link
Contributor Author

TFTR!

bors r=dt

@craig
Copy link
Contributor

craig bot commented Sep 5, 2023

Build succeeded:

@craig craig bot merged commit 1ccd8a5 into cockroachdb:master Sep 5, 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