Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pulsar-client-cpp] Support Seek on Partitioned Topic by Time #7198

Merged
merged 4 commits into from
Jun 8, 2020
Merged

[pulsar-client-cpp] Support Seek on Partitioned Topic by Time #7198

merged 4 commits into from
Jun 8, 2020

Conversation

k2la
Copy link
Contributor

@k2la k2la commented Jun 8, 2020

Modifications

Support seek on partitioned topic.

Verifying this change

  • Make sure that the change passes the CI checks.
  • Make sure that seeking on partitioned topic by time is working.

}
stateLock.unlock();
for (ConsumerList::const_iterator i = consumers_.begin(); i != consumers_.end(); i++) {
(*i)->seekAsync(msgId, callback);
Copy link
Contributor

Choose a reason for hiding this comment

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

The message id is only relative to 1 partition. Seeking with same message id on multiple partition will position the subscription in the wrong position.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understood that.
This PR decides to support only seeking on partitioned topic by time.

callback(ResultOperationNotSupported);
Lock stateLock(mutex_);
if (state_ != Ready) {
callback(ResultAlreadyClosed);
Copy link
Contributor

Choose a reason for hiding this comment

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

The mutex should be released before triggering the callback, since that might be blocking

@k2la k2la changed the title [pulsar-client-cpp] Support Seek on Partitioned Topic [pulsar-client-cpp] Support Seek on Partitioned Topic by Time Jun 8, 2020
@k2la
Copy link
Contributor Author

k2la commented Jun 8, 2020

/pulsarbot run-failure-checks

1 similar comment
@k2la
Copy link
Contributor Author

k2la commented Jun 8, 2020

/pulsarbot run-failure-checks

@codelipenghui codelipenghui added this to the 2.6.0 milestone Jun 8, 2020
@codelipenghui codelipenghui merged commit 2add228 into apache:master Jun 8, 2020
@k2la k2la deleted the support_seek_on_partitioned_topic branch June 9, 2020 01:08
cdbartholomew pushed a commit to kafkaesque-io/pulsar that referenced this pull request Jul 24, 2020
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
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.

3 participants