mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Park <mp...@apache.org>
Subject Review Request 65021: Returned `Try<T>` from `protobuf::read(path)` rather than `Result<T>`.
Date Mon, 08 Jan 2018 18:14:44 GMT

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

Review request for mesos and Benjamin Mahler.


Bugs: MESOS-8375
    https://issues.apache.org/jira/browse/MESOS-8375


Repository: mesos


Description
-------

The path version of `protobuf::read` used to return `Result<T>` and
returned `None` only when the file is empty (`ignorePartial` is always
`false`). The `None` return represents EOF for the "streaming" version
of `protobuf::read` that takes an FD, but for the path version an empty
file when we expected to read `T` is simply an error. Thus, we map the
`None` return to an `Error` for the path version and return a `Try<T>`.


Diffs
-----

  3rdparty/stout/include/stout/protobuf.hpp f00a048fb0363f86cada97352a00a65a27f15bac 


Diff: https://reviews.apache.org/r/65021/diff/1/


Testing
-------


Thanks,

Michael Park


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