Skip to content

fix: Avoid query timeout when loading cards for repeats - #172

Merged
dkorecko merged 1 commit into
mainfrom
fix/avoid-timeout-repeat
Dec 26, 2025
Merged

dkorecko merged 1 commit into
mainfrom
fix/avoid-timeout-repeat

Conversation

@dkorecko

@dkorecko dkorecko commented Dec 26, 2025 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • Performance
    • Optimized database query structure for improved data retrieval efficiency.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 26, 2025 •

Copy link
Copy Markdown

Walkthrough

The change modifies a data query in the RepeatHostedService to optimize Entity Framework Core performance. It removes eager loading of Activities and CardOne entities via ThenInclude, and adds AsSplitQuery() to the Cards query to enable split query execution. The remaining includes—Column, Board, Subtasks, Assignees, Labels, Attachments, Reminders, LinkedIssuesOne, and LinkedIssuesTwo—remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Avoid query timeout when loading cards for repeats' directly describes the main change—optimizing a database query to prevent timeouts in the RepeatHostedService by using split queries.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/avoid-timeout-repeat

📜 Recent review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 36526d2 and f7f0d12.

📒 Files selected for processing (1)
  • Ticky.Internal/Services/Hosted/RepeatHostedService.cs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (1)
Ticky.Internal/Services/Hosted/RepeatHostedService.cs (1)

23-35: The AsSplitQuery() optimization is appropriate and the removal of eager-loaded Activities is safe.

The addition of AsSplitQuery() correctly addresses the cartesian explosion issue when loading multiple collection navigations. Removing the Activities include from this query does not introduce N+1 concerns—lazy loading is disabled in the DataContext (no UseLazyLoadingProxies configuration or EF Core proxies package). The Activities collection is initialized as an empty list on Card entities, so the card.Activities.Add() calls at line 165 work correctly without requiring eager loading.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dkorecko
dkorecko merged commit db43ac5 into main Dec 26, 2025
5 checks passed
@dkorecko
dkorecko deleted the fix/avoid-timeout-repeat branch December 26, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant