We decided to allow application handle flush retires rather than handle it within flush itself. The new algorithm is:
- Send a START-FLUSH to all members in the target set
- Every member sets the flushInProgress flag to true
- If this succeeds, the member sends back an OK
- Else a FAIL is sent back
- If we received OKs from all members, startFlush() succeeded and returns true
- If 1 FAIL is received:
- Send an ABORT-FLUSH to all members which took part in the flush, causes flushInProgress to be set to false
- startFlush() failed and returns false