Skip to content

Conversation

@kou
Copy link
Member

@kou kou commented Nov 30, 2018

No description provided.


typedef struct GPlasmaClientPrivate_ {
std::shared_ptr<plasma::PlasmaClient> client;
plasma::PlasmaClient *client;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that because this change prevent a memory leak?

Copy link
Member Author

Choose a reason for hiding this comment

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

No.
shared_ptr is just not needed here. We don't need to share a plasma::PlasmaClient created by plasma_client_new().

Copy link
Contributor

Choose a reason for hiding this comment

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

I see.

auto plasma_data = plasma_object_buffer.data;
auto plasma_metadata = plasma_object_buffer.metadata;
GArrowBuffer *data;
GArrowBuffer *metadata;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to silence the warning?
https://travis-ci.org/apache/arrow/jobs/461631864#L3955

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.
I forgot return NULL after g_set_error().

auto status = plasma_client->Seal(id_priv->id);
auto success = garrow_error_check(error, status, context);
if (success) {
plasma_client->Release(id_priv->id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to receive status to silence the warning?
https://travis-ci.org/apache/arrow/jobs/461631864#L3940

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.
I've added it.

Copy link
Contributor

@shiro615 shiro615 left a comment

Choose a reason for hiding this comment

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

LGTM
I'll merge this.

@shiro615 shiro615 closed this in 8f02a1b Dec 2, 2018
@kou kou deleted the glib-plasma-create-get branch December 2, 2018 21:30
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.

2 participants