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

Add timeout to remote store calls, and adjust name of cache timeout. #18695

Merged

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented Apr 6, 2023

#16196 moved the cache read timeout down to the network layer, which made it much more accurate. But cache lookups also involve a number of calls to a remote Store, which did not have their own timeout.

This change adds an RPC timeout for Store accesses to allow for retries of tar-pitted remote store RPCs, and adjusts the naming of the --remote-cache-rpc-timeout-millis option to make it clear that it applies to all cache operations (including writes).

@stuhood stuhood added the category:bugfix Bug fixes for released features label Apr 6, 2023
@stuhood stuhood added this to the 2.16.x milestone Apr 6, 2023
@stuhood stuhood requested review from benjyw and tdyas April 6, 2023 21:04
Copy link
Contributor

@tdyas tdyas left a comment

Choose a reason for hiding this comment

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

lgtm

help="Timeout value for remote cache lookups in milliseconds.",
)
remote_cache_rpc_timeout_millis = IntOption(
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to introduce a DurationOption type?

Copy link
Contributor

Choose a reason for hiding this comment

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

Which could take human-readable duration strings and convert them internally to a common format.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

Almost certainly, yea.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

Do you mind opening a ticket about that?

Copy link
Contributor

Choose a reason for hiding this comment

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

@stuhood stuhood enabled auto-merge (squash) April 6, 2023 21:49
@stuhood stuhood merged commit 317a09d into pantsbuild:main Apr 6, 2023
17 checks passed
@stuhood stuhood deleted the stuhood/add-timeout-to-remote-store-calls branch April 6, 2023 22:40
stuhood added a commit to stuhood/pants that referenced this pull request Apr 6, 2023
…antsbuild#18695)

pantsbuild#16196 moved the cache read timeout down to the network layer, which
made it much more accurate. But cache lookups also involve a number of
calls to a remote `Store`, which did not have their own timeout.

This change adds an RPC timeout for `Store` accesses to allow for
retries of tar-pitted remote store RPCs, and adjusts the naming of the
`--remote-cache-rpc-timeout-millis` option to make it clear that it
applies to all cache operations (including writes).
stuhood added a commit that referenced this pull request Apr 7, 2023
…(Cherry-pick of #18695) (#18697)

#16196 moved the cache read timeout down to the network layer, which
made it much more accurate. But cache lookups also involve a number of
calls to a remote `Store`, which did not have their own timeout.

This change adds an RPC timeout for `Store` accesses to allow for
retries of tar-pitted remote store RPCs, and adjusts the naming of the
`--remote-cache-rpc-timeout-millis` option to make it clear that it
applies to all cache operations (including writes).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants