-
Notifications
You must be signed in to change notification settings - Fork 2
Instrument response read failures #109
base: main
Are you sure you want to change the base?
Instrument response read failures #109
Conversation
aarshkshah1992
commented
Jun 6, 2023
•
edited
Loading
edited
- Instrument/logging around range requests % and response read failures
- Ability to experiment by only using core Saturn nodes
pool.go
Outdated
tierMainToUnknown = "main-to-unknown" | ||
tierUnknownToMain = "unknown-to-main" | ||
BackendOverrideKey = "CABOOSE_BACKEND_OVERRIDE" | ||
SaturnOrchUrlEnvKey = "CORE_ONLY" |
There was a problem hiding this comment.
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
u := DefaultOrchestratorEndpoint | ||
if v := os.Getenv(SaturnOrchUrlEnvKey); len(v) > 0 { | ||
u = DefaultOrchestratorCoreEndpoint | ||
} | ||
|
||
c.config.OrchestratorEndpoint, err = url.Parse(u) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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") { |
There was a problem hiding this comment.
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?
ddbfa4c
to
756d8e0
Compare