Repository navigation
Conversation
@greptile review |
[High impact] The PR appears safe to merge based on the changes since the last review. SummaryThis PR reduces repeated database work for heartbeats and bucket lookups, and streams exports instead of loading every event at once.
Reviews (4) · Last reviewed commit: "fix(rest): drop duplicate flask imports ..." · Reviewed by Greptile |
@greptile review |
c1e39f8 to
982c5e2
Compare
|
Thanks @0xbrayo, this is a solid change and the write-serialization + Looks right
Questions / requests
Not testing the TCC-free parts myself beyond reading; happy to re-check after a benchmark and answers on 1–2. |
982c5e2 to
d25c5e2
Compare
@greptile review |
| "Received post request for event in bucket '%s' and data: %s", | ||
| bucket_id, | ||
| data, | ||
| ) |
| bucket_id, | ||
| data, | ||
| ) | ||
|
|
| "Received get request for event with id '%s' in bucket '%s'", | ||
| event_id, | ||
| bucket_id, | ||
| ) |
| event_id, | ||
| bucket_id, | ||
| ) | ||
| event = current_app.api.get_event(bucket_id, event_id) |
| "Received delete request for event with id '%s' in bucket '%s'", | ||
| event_id, | ||
| bucket_id, | ||
| ) |
| event_id, | ||
| bucket_id, | ||
| ) | ||
| success = current_app.api.delete_event(bucket_id, event_id) |
|
Rechecked the rebased head One correction to my earlier dependency note: ActivityWatch/aw-core#159 is now merged, so that merge is no longer a blocker. This PR still pins the personal-fork SHA; before merging, replace it with the appropriate released dependency or an explicitly agreed upstream pin and regenerate the lockfile. My earlier correctness checks remain unproven by the current tests: export equivalence uses only one event, so it cannot detect an ordering regression, and the heartbeat tests do not exercise the cached out-of-order-event case. Those are author follow-ups, not failures demonstrated by the passing suite. I have not changed the branch or retriggered review. |
@greptile review |
3da8e2e to
d4c58f5
Compare
|
Confirmed the duplicate-import fix in |
d4c58f5 to
a1b18aa
Compare
Reduce repeated datastore work on watcher and dashboard requests, and stream large exports with bounded event memory.
Changes:
update_bucketpassingtype=instead of the datastore'stype_id=argument.This PR no longer adds its own query-result cache: it was rebased onto the finished-period query cache that landed in #174, which it builds on (the write serialization and invalidation hooks are shared).
This PR depends on ActivityWatch/aw-core#159. Both pyproject.toml and poetry.lock pin the tested aw-core commit while these coordinated changes are reviewed. The release dependency can replace that pin after the companion changes ship.
Validation:
tests/test_server.py, profile, query cache, and the newtests/test_performance.py): 92 passed, 2 deliberate skips for disk backends in the API-only concurrency test.scripts/profile-api-query.pyreproduces the baseline query profile against a disposable 10,000-event bucket.