presto-main/src/main/java/io/prestosql/execution/buffer/LazyOutputBuffer.java/LazyOutputBuffer/fail
class LazyOutputBuffer:    @Override
    public void fail()
    {
        OutputBuffer outputBuffer;
        synchronized (this) {
            if (delegate == null) {
                // ignore fail if the buffer already in a terminal state.
                state.setIf(FAILED, state -> !state.isTerminal());

                // Do not free readers on fail
                return;
            }
            outputBuffer = delegate;
        }
        outputBuffer.fail();
    }