private int healthCheckFailed ( ) { int oldState , newState ; for ( ; ; ) { oldState = this . state ; if ( ( oldState & ERROR ) != ERROR ) { newState = oldState | ERROR ; UndertowLogger . ROOT_LOGGER . nodeIsInError ( jvmRoute ) ; } else if ( ( oldState & ERROR_MASK ) == ERROR_MASK ) { return ERROR_MASK ; } else { newState = oldState + 1 ; } if ( stateUpdater . compareAndSet ( this , oldState , newState ) ) { return newState & ERROR_MASK ; } } }
Mark a node in error . Mod_cluster has a threshold after which broken nodes get removed .