[Reopen][Issue 5597] Retry when getPartitionedTopicMetadata failed - #5844
Conversation
|
@murong00 Seems there was a test case |
|
@jiazhai ok, will improve it later. |
|
@jiazhai fix the unit test, please help to review again. |
| String urlsWithUnreached = "http://localhost:51000,localhost:" + BROKER_WEBSERVICE_PORT; | ||
| if (isTcpLookup) { | ||
| url = "pulsar://localhost:51000,localhost:51001"; | ||
| urlsWithUnreached = "pulsar://localhost:51000,localhost::" + BROKER_PORT; |
There was a problem hiding this comment.
localhost::" + BROKER_PORT . there are 2 ":" here.
|
|
||
| @Test (timeOut = 4000) | ||
| public void testGetPartitionedTopicDataTimeout() { | ||
| @Test |
There was a problem hiding this comment.
could we create a new test case, the original one is to test timeout, while your new test is try to test retry and success. also how about add some comments or change the test case name to make it more clear? e.g. according to the test steps, the name like 'testMultiHostUrlRetrySuccess' would be better. And some of the test cases are not related with PulsarBrokerStatsClientTest, It would be better to move them to or create a more related test suite, such as PulsarMultiHostClientTest?
There was a problem hiding this comment.
nice advice, have fixed it.
|
Thanks @murong00 for the help, over all looks good to me. left some minor comments. |
|
run java8 tests |
|
run java8 tests |
|
need fix NPE in |
|
run java8 tests |
|
run cpp tests |
1 similar comment
|
run cpp tests |
|
@sijie The retry logic may skip the limit of lookup throttle which can be set on client or server side (e.g. |
|
Meanwhile, fixed some unit test by setting |
|
retest this please |
|
run java8 tests |
|
run java8 tests error: |
|
run integration tests |
|
run java8 tests |
4 similar comments
|
run java8 tests |
|
run java8 tests |
|
run java8 tests |
|
run java8 tests |
…pache#5844) Motivation Fixes apache#5597 Add backoff retries when getting partitioned metadata from brokers. The change in apache#5734 (copy from apache#5603) used the wrong time unit when inited Backoff which failed to trigger the retry logic as expected. Modifications Correct the time unit and add some useful log.
Motivation
Fixes #5597
Add backoff retries when getting partitioned metadata from brokers.
The change in #5734 (copy from #5603) used the wrong time unit when inited
Backoffwhich failed to trigger the retry logic as expected.Modifications
Correct the time unit and add some useful log.