code: @GuardedBy("mLock")
    private void validateWriteRequest(alluxio.grpc.WriteRequest request)
        throws InvalidArgumentException {
      if (request.hasCommand() && request.getCommand().hasOffset()
          && request.getCommand().getOffset() != mContext.getPos()) {
        throw new InvalidArgumentException(String.format(
            "Offsets do not match [received: %d, expected: %d].",
            request.getCommand().getOffset(), mContext.getPos()));
      }
    }
docs: Validates a block write request.
  
  @param request the block write request
  @throws InvalidArgumentException if the write request is invalid