Mike Percy has posted comments on this change.

Change subject: Implement kudu::optional replacement for boost::optional
......................................................................


Patch Set 1:

> Well, the call sites are going to stay the same, but we're taking
> on a few hundred lines of this complicated C++ stuff that we had to
> write ourselves (and thus has a higher chance of bugs vs code taken
> from a mature project like Chromium).

Yeah, the implementation turned out to require more complicated C++ features 
than I had originally envisioned, because of the move semantics and the need to 
support nearly any type. It still doesn't support holding references (although 
the need for that is arguable).

I would like some careful eyes on this before we merge it, as the move 
semantics related stuff that is being done is at the edge of my understanding 
of C++11.

> The other cases where we have re-implemented something like this
> are primarily in synchronization where the benefit has been
> improved instrumentation/debuggability (like tracing integration
> for mutex acquisition time). I don't see any such possibilities
> with something like optional.

Actually I was able to incorporate some ASAN features into this implementation, 
including poisoning and a red zone. It could potentially help to catch 
memory-related bugs, even when it's stack-allocated.

-- 
To view, visit http://gerrit.cloudera.org:8080/3512
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib80c35cc9a4712572f85eeb7717e17869cd5e081
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: No

Reply via email to