Having applied this, I am now seeing logs like this:

> o.a.s.u.LoggingInfoStream [DW][commitScheduler-48-thread-1]:
commitScheduler-48-thread-1 finishFullFlush success=true
> o.a.s.u.LoggingInfoStream [MP][commitScheduler-48-thread-1]: findMerges:
10 segments
...
> o.a.s.u.LoggingInfoStream [MP][commitScheduler-48-thread-1]:
allowedSegmentCount=13 vs count=10 (eligible count=10)
> o.a.s.u.LoggingInfoStream [MS][commitScheduler-48-thread-1]: now merge

I assume that's the indicator I'm looking for.

Adding extra loggers for various merge policies or factories is not adding
any extra logs.

Thanks,
Koen

On Mon, Sep 9, 2024 at 6:08 AM Rahul Goswami <rahul196...@gmail.com> wrote:

> Adding to what Shawn already mentioned, you could alternatively also set <
> infoStream>true</infoStream> in solrconfig.xml. You should find it already
> present in the <indexConfig> section if your solrconfig is built off the
> techproducts config that ships as an example, or you could manually add it.
> That would allow Lucene logs to flow into solr.log. The merge thread in
> Lucene's ConcurrentMergeScheduler is conveniently named "Lucene Merge
> Thread" . Look for this in the logs and you should get what you need.
>
> Rahul
>
> On Sun, Sep 8, 2024 at 1:45 PM Koen De Groote <kdg....@gmail.com> wrote:
>
> > I've set this up at debug, logging it to a separate file, but nothing so
> > far, file created but 0 bytes. I'll keep track for a while to see if it
> > prints anything. Would you recommend the logger to be async? I inherited
> a
> > custom setup where all loggers are sync.
> >
> > Thanks,
> > Koen
> >
> > On Sat, Sep 7, 2024 at 5:56 AM Shawn Heisey <apa...@elyograg.org.invalid
> >
> > wrote:
> >
> > > On 9/6/2024 14:49, Koen De Groote wrote:
> > > > I'm trying to get more insight into when Segment Merges happen.
> > > >
> > > > Right now all I really have to go on is the fact that I sometimes see
> > an
> > > > increase in used disk space for the partition that the solr data
> > > > directories are on, and then after a few minutes this drops again.
> > > >
> > > > I tried adding a logger for "org.apache.lucene" to my log4j2.xml:
> > >
> > > <snip>
> > >
> > > > The file  "lucene.log" gets created, but remains empty. Is there
> > > something
> > > > I'm missing?
> > >
> > > Lucene core has zero dependencies outside of the JDK.  So it doesn't
> > > really have logging like Solr does.
> > >
> > > Solr does have a facility for InfoStream logging which should get
> > > exactly what you are after.  You will find this line in the log4j2.xml
> > > that comes with Solr:
> > >
> > > <AsyncLogger name="org.apache.solr.update.LoggingInfoStream"
> > level="off"/>
> > >
> > > I am unsure what level you should use instead of "off".  Probably
> either
> > > info or debug.
> > >
> > > I believe the resulting log entries will end up in solr.log with the
> > > rest of Solr's logging.
> > >
> > > Thanks,
> > > Shawn
> > >
> > >
> >
>

Reply via email to