transferwise/tw-tkms

Occasional shutdown noise from TkmsStorageToKafkaProxy

Closed this issue · 1 comments

It seems this code in TkmsStorageToKafkaProxy will occasionally log a TimeoutException when application is shutting down, see https://rollbar.com/Wise/fin/items/14285/

try {
    Boolean result = future.get(tkmsPaceMaker.getLongWaitTime(shardPartition.getShard()).toMillis(), TimeUnit.MILLISECONDS);
    if (result == null) {
        throw new IllegalStateException("Hang detected when trying to stop polling of " + shardPartition + ".");
    }
} catch (Throwable t) {
    log.error(t.getMessage(), t);
}

Closing with #68.

The error seen in fin service was effectively the hang detection logic kicking in, just not the way it was intended to.