private void failCurrentBatch(Throwable t) {
            if (currentBatch != null) {
                coordinator.revertLastWrittenOffset(currentBatch.baseOffset);
                for (DeferredEvent event : currentBatch.deferredEvents) {
                    event.complete(t);
                }
                freeCurrentBatch();
            }
        }
Fails the current batch, reverts to the snapshot to the base/start offset of the
batch, fails all the associated events.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java