Skip to content

Reduce Action blobs refreshed in GetActionResult to top level only

Jeremiah Bonney requested to merge jbonney/only-refresh-top-level-action into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

This PR scales back the TTL refreshing of Actions on GetActionResult introduced in !1072 (merged) due to the performance cost. The calls to GetTree can add several round trips depending on the size of the input root, which for some actions has resulted in cache hits being 2-4x slower than before. Now only the high level digests for the Action, Command, and InputRoot are refreshed, which only requires a single CAS read and should have minimal performance impact.

As part of investigating this I realized the metrics for GetTree didn't seem to be accurate, probably due to not using generator_method_duration_metric as GetTree is a streaming RPC. I've fixed that up in a separate commit.

Changes proposed in this merge request:

  • Only refresh ttl for top level digests in Action during GetActionResult
  • Use proper duration metric decorator for GetTree
Edited by Jeremiah Bonney

Merge request reports