pingcap / failpoint

An implementation of failpoints for Golang.
Apache License 2.0
817 stars 63 forks source link

failpoint: don't wrap error when failpoint doesn't exist #73

Closed tiancaiamao closed 2 years ago

tiancaiamao commented 2 years ago

What problem does this PR solve?

For https://github.com/pingcap/tidb/issues/32767

What is changed and how it works?

Avoid the errors.Wrap, it will capture the goroutine stack and cause perfromance issue.

Actually, the error is ignored when the failpoint doesn't exist.

Run TiDB CI before and after this simple change:

run all tasks takes 3m52.775268946s

run all tasks takes 2m51.273945186s

Check List

Tests

Side effects

Related changes

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.