diff options
author | PatrikBuhr <patrik.buhr@est.tech> | 2019-05-02 07:17:11 +0000 |
---|---|---|
committer | PatrikBuhr <patrik.buhr@est.tech> | 2019-05-02 07:17:11 +0000 |
commit | 9e9f0077a6bc1c5bce89caec957b7577d1df0c06 (patch) | |
tree | 32f60cf8a7f19dccb2d8ffcf953752414670305f /datafile-app-server/src/main | |
parent | 7fcb32ce4495d15bbf068094610e2da0414ba7cd (diff) |
Bugfix, trace context
When retrying of file publish, the RequestID in the trace
context is incorect. The context must be expicitly updated
since retrying is executed in a separate thread.
Change-Id: I1c5dc0ba0e53c1219e23f93d8c5b420996a16c93
Issue-ID: DCAEGEN2-1462
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Diffstat (limited to 'datafile-app-server/src/main')
-rw-r--r-- | datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java index 950fbae9..4028ac3f 100644 --- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java +++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java @@ -83,9 +83,7 @@ public class DataRouterPublisher { public Mono<FilePublishInformation> publishFile(FilePublishInformation publishInfo, long numRetries, Duration firstBackoff) { MDC.setContextMap(publishInfo.getContext()); - logger.trace("publishFile called with arg {}", publishInfo); dmaapProducerReactiveHttpClient = resolveClient(); - return Mono.just(publishInfo) // .cache() // .flatMap(this::publishFile) // @@ -93,8 +91,8 @@ public class DataRouterPublisher { .retryBackoff(numRetries, firstBackoff); } - private Mono<HttpStatus> publishFile(FilePublishInformation publishInfo - ) { + private Mono<HttpStatus> publishFile(FilePublishInformation publishInfo) { + MDC.setContextMap(publishInfo.getContext()); logger.trace("Entering publishFile with {}", publishInfo); try { HttpPut put = new HttpPut(); |