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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c247cbf45c
ℹ️ 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".
|
Follow-up feedback and thermo-nuclear audit complete. Feedback classification:
Thermo-nuclear full-diff result: no remaining structural blocker. Production is 481 lines and tests 771; neither crosses 1k. The cleanup phases remain intentionally sequential to avoid multiplying Elasticsearch load, public wrappers preserve the existing API, and response validation is centralized in one canonical helper. Verification:
All four review threads are addressed and resolved; the PR is mergeable and current with origin/main. The external Copilot contributor CLA is the sole remaining gate. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9ebc8c1cc
ℹ️ 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.