Skip to content

Backport of client: Use single time variable when handling heartbeat response. into release/1.10.x #26244

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

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #26238 to be assessed for backporting due to the inclusion of the label backport/1.10.x.

The below text is copied from the body of the original PR.


When the client handles an update status response from the server, it modifies its heartbeat stop tracker with a time set once the RPC call returns. It optionally also emits a log message, if the client suspects it has missed a heartbeat.

These times were originally tracked by two different calls to the time function which were executed 2 microseconds apart. There is no reason we cannot use a single time variable for both uses which saves us one whole call to time.Now.

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

Overview of commits

@jrasell jrasell merged commit 78cc269 into release/1.10.x Jul 10, 2025
31 checks passed
@jrasell jrasell deleted the backport/f-client-mark-time-once-update-status/abnormally-sacred-orca branch July 10, 2025 07:38
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.

2 participants