Monday, December 20, 2021

[SysD] Fail Fast

What

Immediately reports at its interface any condition that is likely to indicate a failure.

Why

Are usually designed to stop normal operation rather than attempt to continue a possibly flawed process. 

How

check the system's state at several points in an operation, so any failures can be detected early. 
The responsibility of a fail-fast module is detecting errors, then letting the next-highest level of the system handle them.

Java ex
ail-fast 机制是Java集合(Collection)中的一种错误机制。 在用迭代器遍历一个集合对象时,如果遍历过程中对集合对象的结构进行了修改(增加、删除),则会抛出Concurrent Modification Exception(并发修改异常)。

No comments:

Post a Comment