mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <>
Subject Re: Review Request 71824: Updated stout recordio encoder/decoder to be lower-level.
Date Tue, 03 Dec 2019 05:25:49 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 3, 2019, 5:25 a.m.)

Review request for mesos, Andrei Sekretenko and Greg Mann.


* Moved from Encoder to stateless encode function.

Bugs: MESOS-10026

Repository: mesos


These previously were templated to operate against typed records,
which imposes a few limitations. Namely, the caller cannot encode
records of different types without using some wrapper type.
Similarly, on the decoding side if the caller expects different
types of records based on some higher level protocol, it needs to
use a wrapper type that just stores the record's bytes for the
caller to decode.

The actual motivation for this patch came from a case where the
caller already has the record in bytes when encoding. We could
use Encoder<string> but it imposes an extra copy of each record,
which is not so straightforward to eliminate while keeping the
interface simple and functional for generic T records.

So, this patch makes the recordio encoder/decoder operate on
records as bytes, and callers can do whatever they wish with
the bytes.

Diffs (updated)

  3rdparty/stout/include/stout/recordio.hpp 9d226c21ed4ba7f31acf8db817470085792aca45 
  3rdparty/stout/tests/recordio_tests.cpp 177939427a7ef5f15cac318a98e40cf77b0b0ada 




Needs the following patch to compile mesos.


Benjamin Mahler

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