You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Andras Katona (JIRA)" <ji...@apache.org> on 2018/10/18 10:43:00 UTC
[jira] [Created] (KAFKA-7518) FutureRecordMetadata.get deadline
calculation from timeout is not using timeunit
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)