-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add easier segment tracing / verbosity / transparency to IndexWriter
#14182
Comments
I have been tinkering with fun little Python tools in luceneutil to 1) parse a full The resulting output is sort of a 2D rendering of the same-ish per-segment information from the merge visualization videos (from my long ago blog post about visualizing Lucene's segment merges). Here is an example of indexing Example (from this run): Some quick explanations:
This is still a work in progress! I suspect the above links only work on desktop browsers with big screens! Feedback welcome :) I still want to reflect deletions better -- a segment accumulates more and more deletions with time, and the UI doesn't show that yet. In doing this, it's clear we need access to a whole bunch of stuff from The overall goal of these tools is to give some badly needed transparency on an index's segments to help in debugging cases where merging is not doing what we'd expect ... (at Amazon Product Search we are also struggling with taming our Also, if anyone has some |
@mikemccand rather than mess with info stream logging could we consider adding some counters to indexwriter to give visibility? Eg if you have a flush count with a simple int getter, that's enough. User can expose these counts via http API and scrape regularly with tool such as Prometheus, and see any storms in graphs. Exposing simple metric counters etc seems like easy low hanging fruit to allow ppl to have better eyes on this stuff |
Description
When trying to understand why a shard seems to not do a good job merging, it's surprisingly difficult to gain visibility / understanding. E.g. cases like #14163 and #13226.
At Amazon Product Search, we are also trying to understand how our service behaves under update storms (many sudden real-time catalog updates), and its impact on merging / NRT segment replication.
IndexWriter
has anInfoStream
which gives amazing verbosity on all that is happening, but it is too voluminous.I'd think we could make a small improvement to
InfoStream
. Today, it writes under different components e.g.SM
for segment merging. I'd like to add a new component,ST
(for "segment tracing"), which provides smallish amount of output about each flush (start and end, size, deletes), each merge (start and end, which segments, how many deletes at the start, how many carryover deletes (deletes that happened while merging was happening), when deletes are applied/written, and time to merge each index section (doc values, postings, knn, etc.)).IW/SM already writes much of this to InfoStream but it's too scattered / diffuse. I'm hoping a new
ST
can be lighter weight and have the important debugging details that can help us understand issues like the ones linked/described above. An application can set anInfoStream
that captures just theST
messages ...Once we have this, the 2nd part of this effort is a simple tool that can digest the output of
ST
InfoStream
and visualize, e.g. producing videos like this one and mayb a 2D interactive canvas/chart that lays out a graphical rendition of all segments and their life times.The text was updated successfully, but these errors were encountered: