tikv / fail-rs

Fail points for rust
Apache License 2.0
332 stars 39 forks source link

fail: check condition only when its failpoint is open #48

Open gengliqi opened 4 years ago

gengliqi commented 4 years ago

Signed-off-by: Liqi Geng gengliqiii@gmail.com

The check-condition code in failpoint runs all the time even it is not open. It may lead to bad performance if checking the condition is very expensive or misuse if someone modifies some variables in check-condition code and it's valid only when its failpoint is open. (my guess scenario)

brson commented 4 years ago

Here's a patch to fix CI: https://github.com/tikv/fail-rs/pull/49