Skip to content

Support remote execution cancellation #380

@oschaaf

Description

@oschaaf

In #367 we add signal handling to the load gen CLI.

A TODO was left in in RemoteProcessImpl::requestExecutionCancellation() as a reminder that we could
also propagate this feature when --nighthawk-service is specified. Today, this feature isn't supported.

A suggested way to complete that would look as follows:

  1. Implement RemoteProcessImpl::requestExecutionCancellation(): have it send a gRPC cancellation request to the remote service.
  2. The remote service should then implement handling of this message by calling ProcessImpl::requestExecutionCancellation() on the currently active ProcessImpl instance.
  3. The step above will then trigger all the workers to bump the right counters and gracefully stop load testing, and these counters should be propagated back to the remote client which requested it, allowing it to confirm cancellation was indeed effective. This should all just work as-is today, but this can also conveniently be used in an end-to-end test which should be added.

I seems most of the challenge will in pulling of 2.:

  • The CancellationRequest message definition should be discussed first to see if the current one suffices.
  • Getting a (safe) hold of the currently executing ProcessImpl instance (if any) may be tricky business as threading models need to be bridged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions