From c22537519afa0fc95c73fdd859b33050e04b2885 Mon Sep 17 00:00:00 2001 From: Christian Kirschnick Date: Mon, 15 Jun 2020 14:53:04 +0200 Subject: [PATCH] Release 1.0.6 (#578) * Introduce new version 1.0.6 * Update log level for invalid TAN syntax check (#553) * Fix fake delay updates (#570) * final adjustments for params (#576) Co-authored-by: MKusber Co-authored-by: Pit Humke --- .mvn/maven.config | 2 +- .../master-config/attenuation-duration.yaml | 4 ++-- .../resources/master-config/exposure-config.yaml | 14 +++++++------- .../controller/SubmissionController.java | 11 ++++++----- .../submission/verification/TanVerifier.java | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.mvn/maven.config b/.mvn/maven.config index 713919738c..062748418a 100644 --- a/.mvn/maven.config +++ b/.mvn/maven.config @@ -1,4 +1,4 @@ --Drevision=1.0.5 +-Drevision=1.0.6 -Dlicense.projectName=Corona-Warn-App -Dlicense.inceptionYear=2020 -Dlicense.licenseName=apache_v2 diff --git a/services/distribution/src/main/resources/master-config/attenuation-duration.yaml b/services/distribution/src/main/resources/master-config/attenuation-duration.yaml index 4ede6bdd0f..7a0aa7e478 100644 --- a/services/distribution/src/main/resources/master-config/attenuation-duration.yaml +++ b/services/distribution/src/main/resources/master-config/attenuation-duration.yaml @@ -10,8 +10,8 @@ # Change this file with caution! thresholds: - lower: 44 - upper: 48 + lower: 55 + upper: 63 weights: low: 1.0 mid: 0.5 diff --git a/services/distribution/src/main/resources/master-config/exposure-config.yaml b/services/distribution/src/main/resources/master-config/exposure-config.yaml index 289c7d4c59..1a7543d0a9 100644 --- a/services/distribution/src/main/resources/master-config/exposure-config.yaml +++ b/services/distribution/src/main/resources/master-config/exposure-config.yaml @@ -41,16 +41,16 @@ days_since_last_exposure: ge_14_days: 5 ge_12_lt_14_days: 5 ge_10_lt_12_days: 5 - ge_8_lt_10_days: 4 - ge_6_lt_8_days: 4 - ge_4_lt_6_days: 4 - ge_2_lt_4_days: 4 - ge_0_lt_2_days: 4 + ge_8_lt_10_days: 5 + ge_6_lt_8_days: 5 + ge_4_lt_6_days: 5 + ge_2_lt_4_days: 5 + ge_0_lt_2_days: 5 attenuation: gt_73_dbm: 0 - gt_63_le_73_dbm: 0 - gt_51_le_63_dbm: 0 + gt_63_le_73_dbm: 1 + gt_51_le_63_dbm: 1 gt_33_le_51_dbm: 1 gt_27_le_33_dbm: 1 gt_15_le_27_dbm: 1 diff --git a/services/submission/src/main/java/app/coronawarn/server/services/submission/controller/SubmissionController.java b/services/submission/src/main/java/app/coronawarn/server/services/submission/controller/SubmissionController.java index d46566b3cc..23a4a7ca45 100644 --- a/services/submission/src/main/java/app/coronawarn/server/services/submission/controller/SubmissionController.java +++ b/services/submission/src/main/java/app/coronawarn/server/services/submission/controller/SubmissionController.java @@ -60,7 +60,7 @@ public class SubmissionController { public static final String SUBMISSION_ROUTE = "/diagnosis-keys"; private final SubmissionControllerMonitor submissionControllerMonitor; - private final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(); + private final ScheduledExecutorService scheduledExecutor = Executors.newScheduledThreadPool(4); private final DiagnosisKeyService diagnosisKeyService; private final TanVerifier tanVerifier; private final Double fakeDelayMovingAverageSamples; @@ -113,20 +113,21 @@ private DeferredResult> buildFakeDeferredResult() { private DeferredResult> buildRealDeferredResult(SubmissionPayload exposureKeys, String tan) { DeferredResult> deferredResult = new DeferredResult<>(); + StopWatch stopWatch = new StopWatch(); + stopWatch.start(); try { - StopWatch stopWatch = new StopWatch(); - stopWatch.start(); if (!this.tanVerifier.verifyTan(tan)) { submissionControllerMonitor.incrementInvalidTanRequestCounter(); deferredResult.setResult(buildTanInvalidResponseEntity()); } else { persistDiagnosisKeysPayload(exposureKeys); deferredResult.setResult(buildSuccessResponseEntity()); - stopWatch.stop(); - updateFakeDelay(stopWatch.getTotalTimeMillis()); } } catch (Exception e) { deferredResult.setErrorResult(e); + } finally { + stopWatch.stop(); + updateFakeDelay(stopWatch.getTotalTimeMillis()); } return deferredResult; diff --git a/services/submission/src/main/java/app/coronawarn/server/services/submission/verification/TanVerifier.java b/services/submission/src/main/java/app/coronawarn/server/services/submission/verification/TanVerifier.java index f993b83df0..ec99fd8fec 100644 --- a/services/submission/src/main/java/app/coronawarn/server/services/submission/verification/TanVerifier.java +++ b/services/submission/src/main/java/app/coronawarn/server/services/submission/verification/TanVerifier.java @@ -57,7 +57,7 @@ public boolean verifyTan(String tanString) { return verifyWithVerificationService(tan); } catch (IllegalArgumentException e) { - logger.debug("TAN Syntax check failed for TAN: {}", tanString.trim()); + logger.error("TAN Syntax check failed for TAN: {}", tanString.trim()); return false; } }