You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2024/03/28 14:58:58 UTC
(solr) branch branch_9x updated: SOLR-17218: Fix indexFetcher logging to include MDC details
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new b7765093688 SOLR-17218: Fix indexFetcher logging to include MDC details
b7765093688 is described below
commit b77650936880d24c280ef301121822156f1d4033
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Thu Mar 28 09:26:42 2024 -0500
SOLR-17218: Fix indexFetcher logging to include MDC details
(cherry picked from commit 418dc06f24ecb8b99138e05ec5c38eeb0f1b0068)
---
solr/CHANGES.txt | 2 ++
solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 523baa44509..8c997e19bef 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -74,6 +74,8 @@ Bug Fixes
* SOLR-17200: Fix false positive race condition in `/health?requireHealthyCores=true` during core loading (hossman)
+* SOLR-17218: Fix indexFetcher logging to include MDC details (hossman)
+
Dependency Upgrades
---------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
index a5451dc1b2b..81a64865ac0 100644
--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -1214,9 +1214,10 @@ public class ReplicationHandler extends RequestHandlerBase
log.info(" No value set for 'pollInterval'. Timer Task not started.");
return;
}
-
+ final Map<String, String> context = MDC.getCopyOfContextMap();
Runnable task =
() -> {
+ MDC.setContextMap(context);
if (pollDisabled.get()) {
log.info("Poll disabled");
return;