Repository navigation
Worker: support optional batching of log events - #1162
Conversation
|
It doesn't look like the |
|
TODO need to add more integration level tests around batching. I've made the log handler robust to batch and non batch, which basically means that most of the tests are in non batch mode. I need to either add a few explicit batch tests, or make batching default in all tests. For the sake of an easier life I think I'll just add a few new tests |
|
from speaking with Stu: not to worried about the size of log payloads on the wire raise an issue to take size into account later. Maybe track batch size or break batch on a large payload Let's be a bit daring and set the default batch to 50. Easy to modify |
|
When enabling batch logs by default on the worker, we should make that a breaking change (because not all lightning versions will be compatible) Alternatively, negotiate support with lightning when joining the run channel, so that we ensure compatiblity |
8380d1e to
641c460
Compare
Works great against new and legacy app, with or without batching
6d196af to
86153c6
Compare
|
Persistent integration test fails in CI. Having a hard time figuring this out - seems OK locally. I am finding a strange exception getting thrown so looking into that... |
|
Phew. Finally got this passing. A bit of docs then I can merge |
* Log limits (#1156) * engine: support payload limits per event * add log limit tests * tests * type * changeset * formatting * update changeset * remove rubbish * Engine: try to make calculating payload sizes more efficient (#1155) * scaffolding: make ensure-payload-size async and add slots for two algorithms * first swing at async traversal This actually increases memory overhead * new traversal algorithm with queue, rather than recuion * add benchmarking util 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * tidying * optimisations Still doesn't get close * add streaming algo * update benchmark * remove traversal algorithm * tidy * tidy up * tidy docs * remove ignore * remove old traverse stats * typing * restore await * add a synchronous publish option important for process exit events * revert debug code --------- Co-authored-by: Claude <noreply@anthropic.com> * Worker: support optional batching of log events (#1162) * worker: re-write core event handler to allow more control of sequencing * tidy tests and finish * types * add basic tests * more testing * Add batching and tests * more tests * options and more tests * types * copy new log stuff from other branch * updates for live testing against lightning Works great against new and legacy app, with or without batching * options for interval and limit * fix test * copy across old test * fix type * add batch log test * upate default batch size * changeset * run integration tests in batch mode * update tests * remove logging * docs * versions: worker@1.20. --------- Co-authored-by: Claude <noreply@anthropic.com>
This PR builds on top of #1161.
It adds batch processing to the new event processor. It basically works like this:
Fixes #790
AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy