Add Solr write-health checks (closed IndexWriter / NFS EIO)#1
Merged
Conversation
The 2026-06-08 vfb_json outage was invisible to the status page: a closed Lucene IndexWriter (EIO on write.lock when the soft NFS mount dropped) made every /update return 500 while /select and /admin/system stayed 200, and the liveness probe is a /select. Add two detectors across every solr_services core: - Passive, read-only: flag a write outage when UPDATE serverErrors (5xx only) rises between checks; baseline taken from history before the new row lands, so a post-restart counter reset never false-alarms. - Active, opt-in (write_probe): empty commit forces IndexWriter.ensureOpen(), catching a closed writer with no other traffic. Off by default (it is a write request, though an empty commit changes no documents). A write failure marks the container not-ok and shows a 'writes failing' badge. Adds solr_history.u_server_errors (migrated via ADD COLUMN) and exposes u_server_errors / write_ok / write_detail on /api/solr.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Solr write-health checks that catch the failure mode behind the 2026-06-08
vfb_jsonoutage: a closed LuceneIndexWriter(anEIOonwrite.lockwhen the soft NFSv3 mount backing/var/solrdropped) turned every/updateinto an HTTP 500 while/selectand/admin/systemkept returning 200. The liveness probe is a/select, so the status page stayed green throughout.What changed
Two detectors now run against every core in
solr_services(public ontology, ServerONLY, Query/vfb_json, Preview/vfb_json):UPDATE./update.serverErrors.countcounter (5xx only — client 4xx can't trip it) rises between checks. The baseline is taken from history before the new row is written, so a post-restart counter reset reads as a negative delta and never false-alarms. No writes against prod.write_probe: trueper service). Issues an empty commit — the only request that reliably forcesIndexWriter.ensureOpen()— so it detects a closed writer even with no other traffic. An empty commit changes no documents, but it is a write request, so it is off by default.A container failing writes is marked not-ok (counts against uptime, shows in the cluster-degraded table) and the Solr card shows a
writes failingbadge. Adds thesolr_history.u_server_errorscolumn (migrated via the existingADD COLUMNpath) and exposesu_server_errors/write_ok/write_detailon/api/solr.Testing
u_server_errorspopulates; active probe correctly off).