*: add CollectProfile method to the Resumer#110556
Merged
craig[bot] merged 5 commits intocockroachdb:masterfrom Sep 20, 2023
Merged
*: add CollectProfile method to the Resumer#110556craig[bot] merged 5 commits intocockroachdb:masterfrom
craig[bot] merged 5 commits intocockroachdb:masterfrom
Conversation
Member
miretskiy
reviewed
Sep 13, 2023
| // CollectProfile is called when a job has been requested to collect a job | ||
| // profile. This profile may contain any information that provides enhanced | ||
| // observability into a job's execution. | ||
| CollectProfile(ctx context.Context, execCtx interface{}) error |
Contributor
There was a problem hiding this comment.
Do we want to have every resumer implement this?
Looks like most of them return nil.
Perhaps we can have
type ProfilerCollector interface {
CollectProfile(....)
}
And have the jobs implement this interface?
When you look at the resumer, check to see if it implemented this method, and call it. If not, return "nil" as the default implementation already does.
Contributor
There was a problem hiding this comment.
I think I prefer the implementation actively, explicitly state that it doesn't want to do anything when profiled, rather than implicitly say so by forgetting to implement the method.
0a02ae9 to
64758e4
Compare
dt
approved these changes
Sep 19, 2023
This change adds a new method to the Resumer interface that will be called whenever we request the execution details for a particular job. This method is currently stubbed for all resumers but will be filled out for those jobs that have opted in to jobs profiling. Informs: cockroachdb#109671 Release note: None
7bea7af to
b0516f4
Compare
Previously, tracing aggregator stats sent back by all processors in the flow would be periodically dumped to the job_info table basis an arbitrary timer. Now, these stats are only persisted to disk when the job has been instructed to collect a profile. Informs: cockroachdb#109671 Release note: None
Previously, tracing aggregator stats sent back by all processors in the flow would be periodically dumped to the job_info table basis an arbitrary timer. Now, these stats are only persisted to disk when the job has been instructed to collect a profile. Informs: cockroachdb#109671 Release note: None
Previously, tracing aggregator stats sent back by all processors in the flow would be periodically dumped to the job_info table basis an arbitrary timer. Now, these stats are only persisted to disk when the job has been instructed to collect a profile. Informs: cockroachdb#109671 Release note: None
b0516f4 to
ef92c98
Compare
Contributor
Author
|
TFTR! bors r=dt |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please refer to individual commits.
Closes: #109671