Repository navigation
Query the event log through a static index - #6100
Merged
Merged
Conversation
GetEventLogItems ran a dynamic query on EventLogItems sorted by RaisedAt. RavenDB serves that with an Auto/EventLogItems/ByRaisedAt index, which exists on every error database that ServicePulse has read the event log from. An auto index has no per-index search engine setting, so the "Error Database Search Engine" custom check keeps failing after all static indexes are migrated to Lucene. Add EventLogItems_ByRaisedAt and query through it.
Each test gets its own error database. Before deleting it, list the auto indexes in it and fail the test if there are any, so a new dynamic query in a data store is caught by the tests that exercise it. With the event log query fixed, the suite creates no auto index in the error database. The throughput database is not checked yet: its licensing queries still create auto indexes until #6099 is merged.
mauroservienti
requested review from
afprtclr,
andreasohlund,
danielmarbach,
ramonsmits and
saratry
November 10, 2026 13:33
saratry
approved these changes
Nov 10, 2026
ramonsmits
approved these changes
Nov 11, 2026
This was referenced Nov 11, 2026
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.
The event log query was the last dynamic query in the error database. RavenDB served it with the auto index
Auto/EventLogItems/ByRaisedAt. Same problem as #5953 for retry batches and #6099 for the throughput database.Analysis
EventLogDataStore.GetEventLogItemsransession.Query<EventLogItem>()sorted byRaisedAt, without a static index. ServicePulse reads the event log, so the auto index exists on most error databases. A customer case reported it after migrating to Lucene.Indexing.Auto.SearchEngineTypeand has no per-index search engine setting. The search engine custom check and the start-up warning keep reporting it after all static indexes use Lucene.Query<T>,DocumentQuery<T>and by-query operation inServiceControl.Persistence.RavenDBandServiceControl.RavenDBuses a static index, or is a collection query without a filter or sort (ExternalIntegrationRequestsDataStore.TryDispatchEventBatch), which creates no index. Nothing outside the RavenDB persistence projects opens a session.Auto/EventLogItems/ByRaisedAtwas the only one.Changes
EventLogItems_ByRaisedAt, mappingRaisedAt.GetEventLogItemsqueries through it.PersistenceTestsContext.TearDownlists the auto indexes in the error database of each test and fails the test if there are any. This catches a new dynamic query in any data store that a test exercises. Without the index change, theEventLogDataStoreTestsfail withAuto/EventLogItems/ByRaisedAt.EventLogIteminRavenPersistedTypes.Existing databases
IndexDefinitionApprovalschanged. Followingdocs/testing.md, the upgrade guide of the next release needs an entry in docs.particular.net.Testing
ServiceControl.Persistence.Tests.RavenDB, full suite: 368/370. The two failures are setup failures with a refused connection to the shared embedded server on port 33334, which also happen onmaster, a different set on each run.Open points