The invention provides a method and system for persistent context-based
behavior injection in a computing system, such as in a redundant storage
system or another system having a layered or modular architecture.
Behaviors that are injected can be specified to have triggering
conditions, such that the behavior is not injected unless the conditions
are true. Triggering conditions may include a selected ordering of
conditions and a selected context for each behavior. In a system having a
layered architecture, behavior injection might be used to evaluate
correct responses in the face of cascaded errors in a specific context or
thread, other errors that are related by context, concurrent errors, or
multiple errors. Behavior injection uses non-volatile memory to preserve
persistence of filter context information across possible system errors,
for reporting of the results of behavior injection, and to preserve
information across recovery from system errors. Multiple behavior
injection threads are also provided. Behavior injection can also be
performed in a logically distributed system or from a logically remote
system.