Mir

Code review comment for lp:~vanvugt/mir/fix-1628794

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> All good questions but those are issues I have already considered...
>
> * Why do a memory allocation? Because each call completes asynchronously in
> the background and must point to a valid Void object and not NULL, or it will
> crash.

That doesn't answer the question: why not use the Void data member whose lifetime surrounds any RPC calls?

I suspect the answer is:

> * Void is not really void. It contains useful error messages and codes, which
> we should pay more attention to.

If we were to use a single object, then using these error codes /could/ be racy.

Some years ago I went through the IPC stack tuning it for performance - a big part of that was enabling reuse of protobuf objects to avoid memory allocations. I no longer understand this code well enough to know whether there is a race here. Let's just land the fix and worry about performance if it comes around again.

review: Approve

« Back to merge proposal