Skip to content

[Issue #39]Add skip flag for cMessageId free#41

Merged
massakam merged 2 commits into
apache:masterfrom
hrsakai:avoid-free
Aug 6, 2019
Merged

[Issue #39]Add skip flag for cMessageId free#41
massakam merged 2 commits into
apache:masterfrom
hrsakai:avoid-free

Conversation

@hrsakai
Copy link
Copy Markdown
Contributor

@hrsakai hrsakai commented Aug 5, 2019

It seems that the issue occurs when gc releases earliest(latest) messageId.
These messageIds shouldn't be released.

In go client library, it doesn't call pulsar_message_id_free() if messageid is earliest or latest.
https://github.com/apache/pulsar/blob/d5036eaefcba42e6c9d159ffb14bee597d13380f/pulsar-client-go/pulsar/c_message.go#L198-L206
https://github.com/apache/pulsar/blob/d5036eaefcba42e6c9d159ffb14bee597d13380f/pulsar-client-go/pulsar/c_message.go#L169-L177

Comment thread src/MessageId.h Outdated
private:
static Napi::FunctionReference constructor;
pulsar_message_id_t *cMessageId;
bool skipcMessageIdFree = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think skipCMessageIdFree is correct as a camel case variable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed it.

@massakam massakam merged commit ea9f923 into apache:master Aug 6, 2019
@massakam massakam added this to the 1.0.0 milestone Aug 29, 2019
@hrsakai hrsakai deleted the avoid-free branch August 28, 2020 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants