Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1147 +/- ##
===========================================
+ Coverage 98.86% 98.87% +0.01%
===========================================
Files 548 548
Lines 8601 8612 +11
Branches 1156 1158 +2
===========================================
+ Hits 8503 8515 +12
Misses 36 36
+ Partials 62 61 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Why
cleanupIntegrationEventsdeleted every expired row in a singlenativeDeleteper table. Ongoogle_play_games_integration_event(1.1M rows, 1.4 GB, about 18k rows and 18 MB a day) that statement ran 10 to 27 s. The server runssync_binlog=1andinnodb_flush_log_at_trx_commit=1, so its one large commit stalls every other commit while it flushes.What
BATCH_SIZE), looping until a batch returns fewer rows than the limit, so no transaction is large.RETENTION_DAYS).Test
should keep deleting while batches are full and keep 30 daysinsertsBATCH_SIZE + 1events aged 31 days plus one aged 29 days, then asserts only the 29-day event survives. Reverting the loop to a single batch makes it fail.pnpm test tests/tasks/cleanupIntegrationEvents.test.ts,pnpm lint,pnpm fmtandtsc --noEmitpass.