Demogorgon314 opened a new pull request #15014: URL: https://github.com/apache/pulsar/pull/15014
Fixes #15001 ### Motivation Currently, when we called `redeliverUnacknowledgedMessages` and consumer use receive with timeout unit is second, the timeout might not work. When we use the second as receive timeout unit like `consumer.receive(3, TimeUnit.SECONDS);`, line 473 will pass a negative timeout to the next `internalReceive` calls, because we are subtracting nanoseconds from seconds. https://github.com/apache/pulsar/blob/f3b87b65c6946eb197c1eece22cff8ff04e16fcb/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L459-L476 ### Modifications * Use the same type to subtract. * Use long type as timeout argument. ### Documentation Check the box below or label this PR directly (if you have committer privilege). Need to update docs? - [ ] `doc-required` (If you need help on updating docs, create a doc issue) - [x] `no-need-doc` This is a bug fix, no need for docs. - [ ] `doc` (If this PR contains doc changes) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
