You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Alex Deparvu (Jira)" <ji...@apache.org> on 2023/10/17 19:58:00 UTC

[jira] [Updated] (SOLR-17035) Add trace id to jetty thread names to improve debuggability via stack traces

     [ https://issues.apache.org/jira/browse/SOLR-17035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Deparvu updated SOLR-17035:
--------------------------------
    Description: 
Proposing to attach the trace id (if exists) data to the jetty thread names (the 'qtp*-*' pool) for more help when debugging a Solr issue. this is a pattern that already exists in Solr (putting the entire MDC context in the name), this jira is to add a single id to the name.

Current format:
{noformat}
qtp1175371136-23 (23)
	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.getFrame​(SegmentTermsEnum.java:213)
	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.pushFrame​(SegmentTermsEnum.java:241)
	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.seekExact​(SegmentTermsEnum.java:494)
	org.apache.lucene.index.TermStates.loadTermsEnum​(TermStates.java:111)
	org.apache.lucene.index.TermStates.build​(TermStates.java:96)
{noformat}
Proposed:
{noformat}
qtp2090991873-68-localhost-2786 (68)
	org.apache.lucene.analysis.CharArrayMap.containsKey​(CharArrayMap.java:99)
	org.apache.lucene.analysis.CharArraySet.contains​(CharArraySet.java:89)
	org.apache.lucene.analysis.StopFilter.accept​(StopFilter.java:97)
	org.apache.lucene.analysis.FilteringTokenFilter.incrementToken​(FilteringTokenFilter.java:52)
	org.apache.lucene.analysis.LowerCaseFilter.incrementToken​(LowerCaseFilter.java:37)
	org.apache.lucene.index.IndexingChain$PerField.invertTokenStream​(IndexingChain.java:1168)
	org.apache.lucene.index.IndexingChain$PerField.invert​(IndexingChain.java:1146)
	org.apache.lucene.index.IndexingChain.processField​(IndexingChain.java:697)
	org.apache.lucene.index.IndexingChain.processDocument​(IndexingChain.java:576)
	org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments​(DocumentsWriterPerThread.java:242)
	org.apache.lucene.index.DocumentsWriter.updateDocuments​(DocumentsWriter.java:432)
	org.apache.lucene.index.IndexWriter.updateDocuments​(IndexWriter.java:1545)
	org.apache.lucene.index.IndexWriter.updateDocuments​(IndexWriter.java:1521)
	org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues​(DirectUpdateHandler2.java:1063)
{noformat}
here `localhost-2786` is the trace id that can be searched in the logs for better correlation between these 2 sources of data (stacktrace, logging).

  was:
Proposing to attach the trace id (if exists) data to the jetty thread names (the 'qtp*-*' pool) for more help when debugging a Solr issue. this is a pattern that already exists in Solr (putting the entire MDC context in the name), this jira is to add a single id to the name.

Current format:
{noformat}
qtp1175371136-23 (23)
	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.getFrame​(SegmentTermsEnum.java:213)
	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.pushFrame​(SegmentTermsEnum.java:241)
	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.seekExact​(SegmentTermsEnum.java:494)
	org.apache.lucene.index.TermStates.loadTermsEnum​(TermStates.java:111)
	org.apache.lucene.index.TermStates.build​(TermStates.java:96)
{noformat}

Proposed:
{noformat}
qtp2090991873-68-localhost-2786 (68)
	org.apache.lucene.analysis.CharArrayMap.containsKey​(CharArrayMap.java:99)
	org.apache.lucene.analysis.CharArraySet.contains​(CharArraySet.java:89)
	org.apache.lucene.analysis.StopFilter.accept​(StopFilter.java:97)
	org.apache.lucene.analysis.FilteringTokenFilter.incrementToken​(FilteringTokenFilter.java:52)
	org.apache.lucene.analysis.LowerCaseFilter.incrementToken​(LowerCaseFilter.java:37)
	org.apache.lucene.index.IndexingChain$PerField.invertTokenStream​(IndexingChain.java:1168)
	org.apache.lucene.index.IndexingChain$PerField.invert​(IndexingChain.java:1146)
	org.apache.lucene.index.IndexingChain.processField​(IndexingChain.java:697)
	org.apache.lucene.index.IndexingChain.processDocument​(IndexingChain.java:576)
	org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments​(DocumentsWriterPerThread.java:242)
	org.apache.lucene.index.DocumentsWriter.updateDocuments​(DocumentsWriter.java:432)
	org.apache.lucene.index.IndexWriter.updateDocuments​(IndexWriter.java:1545)
	org.apache.lucene.index.IndexWriter.updateDocuments​(IndexWriter.java:1521)
	org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues​(DirectUpdateHandler2.java:1063)
{noformat}

here `localhost-2786` is the transaction id that can be searched in the logs for better correlation between these 2 sources of data (stacktrace, logging).






> Add trace id to jetty thread names to improve debuggability via stack traces
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-17035
>                 URL: https://issues.apache.org/jira/browse/SOLR-17035
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Alex Deparvu
>            Assignee: Alex Deparvu
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Proposing to attach the trace id (if exists) data to the jetty thread names (the 'qtp*-*' pool) for more help when debugging a Solr issue. this is a pattern that already exists in Solr (putting the entire MDC context in the name), this jira is to add a single id to the name.
> Current format:
> {noformat}
> qtp1175371136-23 (23)
> 	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.getFrame​(SegmentTermsEnum.java:213)
> 	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.pushFrame​(SegmentTermsEnum.java:241)
> 	org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.seekExact​(SegmentTermsEnum.java:494)
> 	org.apache.lucene.index.TermStates.loadTermsEnum​(TermStates.java:111)
> 	org.apache.lucene.index.TermStates.build​(TermStates.java:96)
> {noformat}
> Proposed:
> {noformat}
> qtp2090991873-68-localhost-2786 (68)
> 	org.apache.lucene.analysis.CharArrayMap.containsKey​(CharArrayMap.java:99)
> 	org.apache.lucene.analysis.CharArraySet.contains​(CharArraySet.java:89)
> 	org.apache.lucene.analysis.StopFilter.accept​(StopFilter.java:97)
> 	org.apache.lucene.analysis.FilteringTokenFilter.incrementToken​(FilteringTokenFilter.java:52)
> 	org.apache.lucene.analysis.LowerCaseFilter.incrementToken​(LowerCaseFilter.java:37)
> 	org.apache.lucene.index.IndexingChain$PerField.invertTokenStream​(IndexingChain.java:1168)
> 	org.apache.lucene.index.IndexingChain$PerField.invert​(IndexingChain.java:1146)
> 	org.apache.lucene.index.IndexingChain.processField​(IndexingChain.java:697)
> 	org.apache.lucene.index.IndexingChain.processDocument​(IndexingChain.java:576)
> 	org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments​(DocumentsWriterPerThread.java:242)
> 	org.apache.lucene.index.DocumentsWriter.updateDocuments​(DocumentsWriter.java:432)
> 	org.apache.lucene.index.IndexWriter.updateDocuments​(IndexWriter.java:1545)
> 	org.apache.lucene.index.IndexWriter.updateDocuments​(IndexWriter.java:1521)
> 	org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues​(DirectUpdateHandler2.java:1063)
> {noformat}
> here `localhost-2786` is the trace id that can be searched in the logs for better correlation between these 2 sources of data (stacktrace, logging).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org