Commit 4610d55
fix: bound per-day fetch limit to MAX_ACTIVITY_ROWS // 30 (closes #13)
Previously per_day_limit was set to MAX_ACTIVITY_ROWS (1000), allowing up
to 30 x 1000 = 30,000 rows to be fetched across all 30 partitions before
the post-gather trim. Changed to max(1, MAX_ACTIVITY_ROWS // 30) (~33) so
the total rows fetched stays bounded at ~MAX_ACTIVITY_ROWS.
Added test_list_user_activity_per_day_limit_is_bounded to assert that
find() is called with the smaller per-partition limit for all 30 partitions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 0a2e6e5 commit 4610d55
2 files changed
Lines changed: 37 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
365 | 398 | | |
366 | 399 | | |
367 | 400 | | |
| |||
0 commit comments