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

[improve][client] Document Java Client's Seek logic thread-safety improved in #20242 #20284

Merged
merged 4 commits into from
May 17, 2023
Merged

[improve][client] Document Java Client's Seek logic thread-safety improved in #20242 #20284

merged 4 commits into from
May 17, 2023

Conversation

JooHyukKim
Copy link
Contributor

@JooHyukKim JooHyukKim commented May 9, 2023

Master Issue: #19671

Motivation

Improves JavaDoc describing changes made by PR #20242 as suggested by in review

EDIT: modified JavaDoc to also cover #20321 accordingly

Modifications

Add JavaDoc regarding thready-safety to the methods in scope of #20242

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework only adds JavaDoc

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: https://github.com/JooHyukKim/pulsar/pull/2

@github-actions github-actions bot added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label May 9, 2023
@@ -523,11 +523,15 @@ CompletableFuture<Void> reconsumeLaterCumulativeAsync(Message<?> message,

/**
* The asynchronous version of {@link Consumer#seek(MessageId)}.
* <p>
* If there is already a seek operation in progress, the method will log a warning and return a canceled future.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* If there is already a seek operation in progress, the method will log a warning and return a canceled future.
* If there is already a seek operation in progress, the method will log a warning and return a future completed exceptionally.

See #20321

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh okay, will do 👍🏻👍🏻

*/
CompletableFuture<Void> seekAsync(MessageId messageId);

/**
* Reset the subscription associated with this consumer to a specific message publish time.
* <p>
* If there is already a seek operation in progress, the method will log a warning and return a canceled future.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* If there is already a seek operation in progress, the method will log a warning and return a canceled future.
* If there is already a seek operation in progress, the method will log a warning and return a future completed exceptionally.

@JooHyukKim JooHyukKim requested a review from tisonkun May 15, 2023 20:48
@JooHyukKim
Copy link
Contributor Author

Motivation

Improves JavaDoc describing changes made by PR #20242 as suggested by in review

EDIT: modified JavaDoc to also cover #20321 accordingly

@tisonkun thank you for the reminder, I updated the PR description also.

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @JooHyukKim

@tisonkun
Copy link
Member

Error:  src/main/java/org/apache/pulsar/client/api/Consumer.java:[469] (regexp) RegexpSingleline: Trailing whitespace
Error:  src/main/java/org/apache/pulsar/client/api/Consumer.java:[490] (regexp) RegexpSingleline: Trailing whitespace
Error:  src/main/java/org/apache/pulsar/client/api/Consumer.java:[502] (regexp) RegexpSingleline: Trailing whitespace
Error:  src/main/java/org/apache/pulsar/client/api/Consumer.java:[504] (regexp) RegexpSingleline: Trailing whitespace
Error:  src/main/java/org/apache/pulsar/client/api/Consumer.java:[537] (regexp) RegexpSingleline: Trailing whitespace

Please fix only the reported style violations. You can check locally by running:

./mvnw initialize checkstyle:check

@JooHyukKim
Copy link
Contributor Author

My apologies 🙏🏼 Will do now and re-request review shortly, @tisonkun.

@JooHyukKim JooHyukKim requested a review from tisonkun May 17, 2023 02:27
@Technoboy- Technoboy- added this to the 3.1.0 milestone May 17, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2023

Codecov Report

Merging #20284 (ad66df2) into master (00f17e8) will increase coverage by 35.30%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #20284       +/-   ##
=============================================
+ Coverage     37.61%   72.91%   +35.30%     
- Complexity    12589    31951    +19362     
=============================================
  Files          1691     1868      +177     
  Lines        129028   138663     +9635     
  Branches      14066    15248     +1182     
=============================================
+ Hits          48530   101112    +52582     
+ Misses        74183    29484    -44699     
- Partials       6315     8067     +1752     
Flag Coverage Δ
inttests 24.12% <100.00%> (-0.06%) ⬇️
systests 24.86% <100.00%> (+0.09%) ⬆️
unittests 72.19% <100.00%> (+39.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../apache/bookkeeper/mledger/impl/MetaStoreImpl.java 85.21% <100.00%> (+43.30%) ⬆️

... and 1429 files with indirect coverage changes

@Technoboy- Technoboy- merged commit 1a7a876 into apache:master May 17, 2023
@JooHyukKim JooHyukKim deleted the 19671-add-doc branch June 5, 2023 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants