private void cleanupChunks(Exception exception) {
    logger.trace("Cleaning up remaining chunks");
    Chunk chunk = chunksAwaitingCallback.poll();
    while (chunk != null) {
      chunk.resolveChunk(exception);
      chunk = chunksAwaitingCallback.poll();
    }
    chunk = chunksToWrite.poll();
    while (chunk != null) {
      chunk.onDequeue();
      chunk.resolveChunk(exception);
      chunk = chunksToWrite.poll();
    }
  }
Cleans up all the chunks remaining by invoking their callbacks.
@param exception the {@link Exception} to provide in the callback. Can be {@code null}.
ambry-rest/src/main/java/com/github/ambry/rest/NettyResponseChannel.java