Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Apr 23, 2018

When compiled with GPU support, the PlasmaClient ABI would differ, leading to a crash in the Python bindings to Plasma.

@pitrou
Copy link
Member Author

pitrou commented Apr 23, 2018

I think the AppVeyor failure is unrelated. It also succeeded on my AppVeyor account: https://ci.appveyor.com/project/pitrou/arrow/build/1.0.331

When compiled with GPU support, the PlasmaClient ABI would differ, leading
to a crash in the Python bindings to Plasma.
@pitrou pitrou force-pushed the ARROW-2489-plasma-client-abi branch from 94cb336 to 7d28354 Compare April 23, 2018 20:18
arrow::gpu::CudaDeviceManager* manager_;
#endif
class ARROW_NO_EXPORT Impl;
std::shared_ptr<Impl> impl_;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't PIMPLs be at least a unique_ptr?

Note that we might should use something of the lines of http://brotherst-code.blogspot.de/2015/09/the-pimpl-idiom-youre-doing-it-wrong.html as we would still run into the problem of const correctness with PIMPLs otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's an interesting issue. We may want to open a JIRA about that.

As for the pointer kind: we will need shared_ptr to solve ARROW-2448. We can use unique_ptr in this PR and change it later if you prefer (but that'll probably change the ABI).

Copy link
Contributor

@pcmoritz pcmoritz Apr 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we will need the shared_ptr so I'm in favor of leaving it. I wonder if there is a good way to get the PIMPL const correctness with the shared pointer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For PlasmaClient I don't think const-ness is a very useful piece of information. It's a thing that talks over the network (what is a const TCP connection?).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was a more general piece of information. The const correctness is rather something that we would need with the core Arrow structures such as Array or Buffer.

Copy link
Contributor

@pcmoritz pcmoritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Thanks for doing this!

#include <assert.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <stdbool.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably remove this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this now, I'll remove the include in #1939

@pcmoritz pcmoritz closed this in 2abc889 Apr 24, 2018
pcmoritz added a commit that referenced this pull request Apr 25, 2018
This is a followup to #1933 which does reference counting of the PlasmaClient held by PlasmaBuffers to avoid the segfault in ARROW-2448.

Author: Philipp Moritz <pcmoritz@gmail.com>

Closes #1939 from pcmoritz/autoget-sharedptr and squashes the following commits:

f1e6e8b <Philipp Moritz> fix test
2da395f <Philipp Moritz> update
13b1204 <Philipp Moritz> fixes
b68b15e <Philipp Moritz> fix ObjectStatus
6d560db <Philipp Moritz> remove headers
94cdfd7 <Philipp Moritz> add test
6798ed0 <Philipp Moritz> Give shared_ptr of PlasmaClient::Impl to PlasmaBuffer
@pitrou pitrou deleted the ARROW-2489-plasma-client-abi branch March 2, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants