Andras Katona created KAFKA-7518:
------------------------------------
Summary: FutureRecordMetadata.get deadline calculation from
timeout is not using timeunit
Key: KAFKA-7518
URL: https://issues.apache.org/jira/browse/KAFKA-7518
Project: Kafka
Issue Type: Bug
Components: clients
Reporter: Andras Katona
Assignee: Andras Katona
Code below assumes that timeout is in milliseconds when calculating deadline.
{code}
@Override
public RecordMetadata get(long timeout, TimeUnit unit) throws
InterruptedException, ExecutionException, TimeoutException {
// Handle overflow.
long now = System.currentTimeMillis();
long deadline = Long.MAX_VALUE - timeout < now ? Long.MAX_VALUE : now +
timeout;
{code}
It was causing
{{kafka.server.DynamicBrokerReconfigurationTest#testAdvertisedListenerUpdate}}
to fail sometimes and it took me to this code segment.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)