http://jira.mfd.msk:8088/browse/CLS-189 добавил логи, чтобы было ясно про ассинхронность

This commit is contained in:
AKurakin 2023-02-09 12:34:30 +03:00
parent 8b119cc145
commit 331710f288
2 changed files with 3 additions and 0 deletions

View file

@ -188,6 +188,8 @@ public class Clearing {
//обновлен, и была проблема была с сетью/недоступностью кафки etc. //обновлен, и была проблема была с сетью/недоступностью кафки etc.
} catch (InterruptedException e) { } catch (InterruptedException e) {
log.error(ExceptionUtils.getStackTrace(e)); log.error(ExceptionUtils.getStackTrace(e));
Thread.currentThread().interrupt();
throw new RuntimeException(e);
} }
if (!Objects.equals(lastAccBalanceResponseId, sentRequestId)) { if (!Objects.equals(lastAccBalanceResponseId, sentRequestId)) {
log.error("FATAL: last response from AccountBalance update from Kafka ID was {}, but sent ID was {}", log.error("FATAL: last response from AccountBalance update from Kafka ID was {}, but sent ID was {}",

View file

@ -90,6 +90,7 @@ public class ClearingService implements DisposableBean {
public void continueClearing(BaseRequest<CommonIdRequest> event) { public void continueClearing(BaseRequest<CommonIdRequest> event) {
synchronized (clearing) { synchronized (clearing) {
CommonIdRequest requestPayload = event.getRequestPayload(); CommonIdRequest requestPayload = event.getRequestPayload();
log.debug("continueClearing for id={}", requestPayload.getId());
clearing.setLastAccBalanceResponseId(requestPayload.getId()); clearing.setLastAccBalanceResponseId(requestPayload.getId());
clearing.notifyAll(); clearing.notifyAll();
} }