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

bug:replace with func recordFailure #4919

Merged

Conversation

zgfzgf
Copy link
Contributor

@zgfzgf zgfzgf commented Nov 19, 2020

tag.Insert
func (m *Map) insert(k Key, v string, md metadatas) {
if _, ok := m.m[k]; ok {
return
}
m.m[k] = tagContent{value: v, m: md}
}
should be:
func (m *Map) upsert(k Key, v string, md metadatas) {
m.m[k] = tagContent{value: v, m: md}
}

lotus/chain/sub/incoming.go

Lines 605 to 611 in dc3d17c

func recordFailure(ctx context.Context, metric *stats.Int64Measure, failureType string) {
ctx, _ = tag.New(
ctx,
tag.Upsert(metrics.FailureType, failureType),
)
stats.Record(ctx, metric.M(1))
}

@magik6k magik6k merged commit 91a3d1d into filecoin-project:master Nov 20, 2020
@zgfzgf zgfzgf deleted the fix-incoming-validateblock-record branch December 4, 2020 03:28
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