Repository navigation
take seek time into account in Reader#hasMessageAvailable - #7848
aloyszhang wants to merge 10 commits into
Conversation
|
@sijie @jiazhai CI failed when build pulsar image , error information [ERROR] The command '/bin/sh -c /pulsar/bin/install-pulsar-client-27.sh' returned a non-zero code: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20:24 min
[INFO] Finished at: 2020-08-19T06:51:53Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (default) on project pulsar-docker-image: Could not build image: The command '/bin/sh -c /pulsar/bin/install-pulsar-client-27.sh' returned a non-zero code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
##[error]Process completed with exit code 1.It seems have nothing to do with this PR. Any suggestions for resolving this CI problem? |
|
/pulsarbot run-failure-checks |
|
@aloyszhang You can try to rebase the apache master branch |
|
@codelipenghui Thanks ,I will try it. |
2b647e1 to
6c06851
Compare
There was a problem hiding this comment.
I think the broker should return the start message id to the client when handling the seek request. So that we can update the startMessageId of the consumer to the responded message id.
If we return the publish time and return has available messages according to the time, the clocks of the client and server must be consistent. Aways use message id to calculate have available messages is more reasonable.
|
@codelipenghui Think about this case,
|
|
/pulsarbot run-failure-checks |
|
@codelipenghui @jiazhai CI failed all the time, PATL. |
the publish time and the seek time may be assigned by the different client, right? |
Yes, the publish time and the seek time can be assigned by different client. But in my opoion, maybe |
|
@codelipenghui Does this pr need more discuss? |
0b3bbe0 to
668aa05
Compare
|
/pulsarbot run-failure-checks |
|
@aloyszhang Thanks for the contribution. I agree with Penghui, we should make ledgerId/entryId as the source of truth. |
668aa05 to
325c5a3
Compare
|
/pulsarbot run-failure-checks |
|
@aloyszhang Is the change ready for review again? |
|
@sijie I'll check whether failed CI has relation to this PR or not soon. |
0cec215 to
f1259d0
Compare
|
/pulsarbot run-failure-checks |
1 similar comment
|
/pulsarbot run-failure-checks |
|
@codelipenghui PTAL |
|
ping @sijie @codelipenghui @jiazhai Would you please take a look about this PR? |
This would be an issue |
eolivelli
left a comment
There was a problem hiding this comment.
Is it possible to send the new type of response only to newer clients and preserve old behaviour in case of an old client.
Btw this change cannot go into 2.7.1, it is a wire protocol change, it can be only from 2.8.0
|
Remove the |
|
ping @315157973 Could you please help take a look at this issue? Seems related to #10414 |
This problem has always been there, and it is not caused by my PR. This PR also fixes the problem of the reader, all hasMessageAvailable returns true, but the message cannot be read. |
| return new MessageIdImpl(ledgerId, entryId, -1); | ||
| } | ||
|
|
||
| public static int getBathIndexFromMessageIdData(PulsarApi.MessageIdData messageIdData) { |
There was a problem hiding this comment.
should be getBatchIndexFromMessageIdData
|
@aloyszhang:Thanks for your contribution. For this PR, do we need to update docs? |
|
Closed as stale and conflict. Please rebase and resubmit the patch if it's still relevant. |
Fixes #7796
Motivation
This PR takes seek time into account in Reader#hasMessageAvailable.
Modifications
Readerwhenseek(timestamp)Reader#hasMessageAvailablegive true or false