[
https://issues.apache.org/jira/browse/SOLR-17218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris M. Hostetter updated SOLR-17218:
--------------------------------------
Attachment: SOLR-17218.patch
Status: Open (was: Open)
Most of the time in Solr we use {{MDCAwareThreadPoolExecutor}} and that handles
this for us, but {{(indexFetcher}} is one of the few places were we use a
{{ScheduledExecutor}} so that isn't viable here.
Since the {{ScheduledExecutor}} is private to {{ReplicationHandler}} and only
has one scheduled {{Runnable}} it's straight forward to just set the MDC
context to be consistnet on every poll.
{noformat}
024-03-27 21:05:19.867 INFO (indexFetcher-48-thread-1) [c:xxx s:shard1
r:core_node12 x:xxx_shard1_replica_p10 t:localhost-10] o.a.s.h.IndexFetcher
Leader's generation: 2
2024-03-27 21:05:19.867 INFO (indexFetcher-48-thread-1) [c:xxx s:shard1
r:core_node12 x:xxx_shard1_replica_p10 t:localhost-10] o.a.s.h.IndexFetcher
Leader's version: 1711573505348
2024-03-27 21:05:19.867 INFO (indexFetcher-48-thread-1) [c:xxx s:shard1
r:core_node12 x:xxx_shard1_replica_p10 t:localhost-10] o.a.s.h.IndexFetcher
Follower's generation: 2
2024-03-27 21:05:19.867 INFO (indexFetcher-48-thread-1) [c:xxx s:shard1
r:core_node12 x:xxx_shard1_replica_p10 t:localhost-10] o.a.s.h.IndexFetcher
Follower's version: 1711573505348
2024-03-27 21:05:19.867 INFO (indexFetcher-48-thread-1) [c:xxx s:shard1
r:core_node12 x:xxx_shard1_replica_p10 t:localhost-10] o.a.s.h.IndexFetcher
Follower in sync with leader.
2024-03-27 21:05:22.345 INFO (indexFetcher-68-thread-1) [c:yyy s:shard1
r:core_node3 x:yyy_shard1_replica_p1 t:localhost-14] o.a.s.h.IndexFetcher
Leader's generation: 1
2024-03-27 21:05:22.345 INFO (indexFetcher-68-thread-1) [c:yyy s:shard1
r:core_node3 x:yyy_shard1_replica_p1 t:localhost-14] o.a.s.h.IndexFetcher
Leader's version: 0
2024-03-27 21:05:22.345 INFO (indexFetcher-68-thread-1) [c:yyy s:shard1
r:core_node3 x:yyy_shard1_replica_p1 t:localhost-14] o.a.s.h.IndexFetcher
Follower's generation: 1
2024-03-27 21:05:22.345 INFO (indexFetcher-68-thread-1) [c:yyy s:shard1
r:core_node3 x:yyy_shard1_replica_p1 t:localhost-14] o.a.s.h.IndexFetcher
Follower's version: 0
{noformat}
> indexFetcher thread logging doesn't include any MDC context
> -----------------------------------------------------------
>
> Key: SOLR-17218
> URL: https://issues.apache.org/jira/browse/SOLR-17218
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Assignee: Chris M. Hostetter
> Priority: Major
> Attachments: SOLR-17218.patch
>
>
> When {{indexFetcher}} threads log messages, there is no MDC context, making
> it impossible to know what collection/replica is involved (unless the log
> message happens to refer to a patch name with a core data dir in it)...
> {noformat}
> 2024-02-29 09:55:55.682 INFO (indexFetcher-2708-thread-1) []
> o.a.s.h.IndexFetcher Follower's version: 1709189931071
> 2024-02-29 09:55:55.682 INFO (indexFetcher-2715-thread-1) []
> o.a.s.h.IndexFetcher Follower in sync with leader.{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]