mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Park <mp...@apache.org>
Subject Re: Review Request 46285: Windows: [2/3] `sendfile` used with the typed error state of `Try`.
Date Tue, 19 Apr 2016 22:31:03 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46285/#review129635
-----------------------------------------------------------




3rdparty/libprocess/src/poll_socket.cpp (line 135)
<https://reviews.apache.org/r/46285/#comment193104>

    This is already part of master. It looks like this patch needs to be rebased.



3rdparty/libprocess/src/poll_socket.cpp (lines 204 - 220)
<https://reviews.apache.org/r/46285/#comment193105>

    How about we clean this up a little bit:
    
    ```cpp
    if (!length.isError()) {
      CHECK(length.get() >= 0);
      if (length.get() == 0) {
        // Socket closed.
        VLOG(1) << "Socket closed while sending";
      }
      return length.get();
    }
    
    if (net::is_restartable_error(length.error().code)) {
      // Interrupted, try again now.
      continue;
    } else if (net::is_retryable_error(length.error().code)) {
      // Might block, try again later.
      return io::poll(s, io::WRITE)
        .then(lambda::bind(&internal::socket_send_file, s, fd, offset, size));
    } else {
      // Socket error.
      VLOG(1) << length.error().message;
      return Failure(length.error());
    }
    ```


- Michael Park


On April 16, 2016, 12:20 a.m., Daniel Pravat wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46285/
> -----------------------------------------------------------
> 
> (Updated April 16, 2016, 12:20 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and
Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Windows: [2/3] `sendfile` used with the typed error state of `Try`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/poll_socket.cpp cb2878565a112017b190b4ff83dc65a876ea45f9 
> 
> Diff: https://reviews.apache.org/r/46285/diff/
> 
> 
> Testing
> -------
> 
> OSX: make check
> 
> 
> Thanks,
> 
> Daniel Pravat
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message