Fail-fast is a property of a system or module with respect to its response to failures. A fail-fast system is designed to immediately report at its interface any failure or condition that is likely to lead to failure. Fail-fast systems are usually designed to stop normal operation rather than attempt to continue a possibly-flawed process. Such designs often check the system's state at several points in an operation, so any failures can be detected early. A fail-fast module passes the responsibility for handling errors, but not detecting them, to the next-higher system design level. Fail-fast is also sometimes called fail-stop.
Fail-fast systems or modules are desirable in several circumstances:
* When building a fault-tolerant system by means of redundant components, the individual components should be fail-fast to give the system enough information to successfully tolerate a failure.
* Fail-fast components are often used in situations where failure in one component might not be visible until it leads to failure in another component.
* Finding the cause of a failure is easier in a fail-fast system, because the system reports the failure with as much information as possible as close to the time of failure as possible. In a fault-tolerant system, the failure might go undetected, whereas in a system that is neither fault-tolerant nor fail-fast the failure might be temporarily hidden until it causes some seemingly-unrelated problem later.
* A fail-fast system that is designed to halt as well as report the error on failure is less likely to erroneously perform an irreversible or costly operation.
from:
http://en.wikipedia.org/wiki/Fail-fast
分享到:
相关推荐
【面试普通人VS高手系列】Fail-safe机制与Fail-fast机制分别有什么作用.doc
fail-fast俗称快速失败,是在多线程进行迭代操作时产生冲突的一种异常抛出机制,下面我们就由ArrayList来深入理解Java中的fail-fast机制.
前端开源库-hydro-fail-fast液压快速失效,第一次失效时中止液压试验
Fail-Fast机制 由于HashMap(ArrayList)并不是线程安全的,因此如果在使用迭代器的过程中有其他线程修改了map(这里的修改是指结构上的修改
文章目录简介Fail-fast IteratorFail-fast 的原理Fail-safe Iterator总结 fail-safe fail-fast知多少 简介 我们在使用集合类的时候,通常会需要去遍历集合中的元素,并在遍历中对其中的元素进行处理。这时候我们就要...
主要介绍了Java你告诉我 fail-fast 是什么鬼,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
目录常见方案的配置示例并行运行的配置TypeScript的用法 安装将插件添加到devDependenciesnpm i --save-dev cypress-fail-fast 在cypress/plugins/index.js内部: module . exports = ( on , config ) => { require ...
主要介绍了Java fail-fast,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
最小测试:: FailFast 重新实现RSpec的故障快速功能,因为存在测试失败,该功能将退出运行测试套件。 安装 将此行添加到您的应用程序的Gemfile中: gem 'minitest-fail-fast' 然后执行: $ bundle 或将其自己...
npm install grunt-fail-fast-task-runner --save-dev 插件安装完成后,可以使用以下JavaScript代码在您的Gruntfile中启用该插件: grunt . loadNpmTasks ( 'grunt-fail-fast-task-runner' ) ; “ fail_fast_task_...
fail-fast 机制是java集合(Collection)中的一种错误机制。当多个线程对同一个集合的内容进行操作时,就可能会产生fail-fast事件。例如:当某一个线程A通过iterator去遍历某集合的过程中,若该集合的内容被其他线程所...
下面小编就为大家带来一篇老生常谈java中的fail-fast机制。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
掌握 Iterator 的 fail-fast 、fail-safe 机制 ArrayList() 会使用长度为零的数组 ArrayList(int initialCapacity) 会使用指定容量的数组 public ArrayList(Collection<? extends E> c) 会使用 c 的大小作为数组...
oracle 12 c ORA-01017: 用户名/口令无效; 登录被拒绝
rabbitmq依赖包。...●Fail-fast(中文译为速错),即尽可能快的暴露程序中的错误。 ●面向并发的编程(COP concurrency-oriented programming) ●函数式编程 ●动态类型 ●及早求值或严格求值 ●支持脚本运行
什么是 fail-fast 机制? 如何使用 Collections 类对集合进行排序? 什么是 Comparable 和 Comparator 接口?它们有什么区别? 如何使用 ConcurrentHashMap 类来实现线程安全的映射? 如何避免在多线程环境下对同一...
Java集合详解3:Iterator,fail-fast机制与比较器 Java集合详解4:HashMap和HashTable Java集合详解5:深入理解LinkedHashMap和LRU缓存 Java集合详解6:TreeMap和红黑树 Java集合详解7:HashSet,TreeSet与...
当多个线程对同一个集合的内容进行操作时,就可能会产生fail-fast事件。 通过modCount的值来判断是否多线程同时操作,modCount用来记录List修改的次数:每修改一次(添加/删除等操作),将modCount+1 LinkedList 继承...
Erlang特性: ...●Fail-fast(中文译为速错),即尽可能快的暴露程序中的错误。 ●面向并发的编程(COP concurrency-oriented programming) ●函数式编程 ●动态类型 ●及早求值或严格求值 ●支持脚本运行
【Java基础】集合框架-面试题。包含: 1. ArrayList 和 Vector 的区别;...3. 快速失败 (fail-fast) 和安全失败 (fail-safe) 的区别; 4. HashMap 的数据结构、工作原理 等Java集合部分经常遇到的面试题总结