Scope orphaned-event cleanup to recent ingest window to eliminate 8-hour ES CPU spikes#2279
Conversation
|
|
Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com>
Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com>
…luster-cpu-spikes # Conflicts: # src/Exceptionless.Core/Jobs/CleanupOrphanedDataJob.cs # tests/Exceptionless.Tests/Jobs/CleanupDataJobTests.cs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9531879f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0910ef8ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What changed
Elastic.Clients.Elasticsearchand repository architecture frommain.Why
The cleanup job runs every eight hours. Scanning all event history caused unnecessary Elasticsearch CPU spikes even though actionable orphan cleanup is limited to the practical recent-ingest window.
Verification
dotnet build tests/Exceptionless.Tests/Exceptionless.Tests.csproj --no-restore --nologo --verbosity:minimalExceptionless.Tests --filter-class Exceptionless.Tests.Jobs.CleanupDataJobTests: 28 passedCompatibility
No public API, WebSocket, configuration, or frontend behavior changes.