Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Instrument response read failures #109

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

aarshkshah1992
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 commented Jun 6, 2023

  • Instrument/logging around range requests % and response read failures
  • Ability to experiment by only using core Saturn nodes

@aarshkshah1992 aarshkshah1992 requested a review from willscott June 6, 2023 08:24
pool.go Outdated
tierMainToUnknown = "main-to-unknown"
tierUnknownToMain = "unknown-to-main"
BackendOverrideKey = "CABOOSE_BACKEND_OVERRIDE"
SaturnOrchUrlEnvKey = "CORE_ONLY"
Copy link
Contributor

Choose a reason for hiding this comment

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

this is only used in caboose.go and should be declared there.

caboose.go Outdated
Comment on lines 211 to 216
u := DefaultOrchestratorEndpoint
if v := os.Getenv(SaturnOrchUrlEnvKey); len(v) > 0 {
u = DefaultOrchestratorCoreEndpoint
}

c.config.OrchestratorEndpoint, err = url.Parse(u)
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we adding additional complexity here? we already have an env variable to set OrchestratorEndpoint - why wouldn't we pass in the custom 'core only' orchestrator endpoint that way ,versus this pair of over-rides?

in practice, orchestrator is, i think, set in bifrost-gateway which woudl mean neither of these over-rides would take effect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh right. I agree. I'll fix this.

fetcher.go Outdated
@@ -86,6 +87,11 @@ func (p *pool) doFetch(ctx context.Context, from string, c cid.Cid, attempt int)

// TODO Refactor to use a metrics collector that separates the collection of metrics from the actual fetching
func (p *pool) fetchResource(ctx context.Context, from string, resource string, mime string, attempt int, cb DataCallback) (rm tieredhashing.ResponseMetrics, err error) {
isRange := "no"
if strings.Contains(resource, "bytes") {
Copy link
Contributor

Choose a reason for hiding this comment

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

  • should we parse the URL and make sure there's a query parameter with the name?
  • the name should be entity-bytes not bytes, right?

@aarshkshah1992 aarshkshah1992 force-pushed the feat/better-instrument-response-read-failures branch from ddbfa4c to 756d8e0 Compare June 6, 2023 14:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants