-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a bunch of bugs plus an improvement to log_parser that I used to debug this. #302
base: master
Are you sure you want to change the base?
Conversation
…tor to be virtual.
Add a dtor to live_model_impl and flush the queues from it. Why flushing from live_model_impl is ok but from async_batcher is not? async_batcher holds un-owned references to a lot of stuff and the expectation is that those objects won't be valid during destruction. Flushing data in async_batcher requires those dangling pointers to be valid so we cannot do it from the dtor. Then why is it ok to do it from live_model_impl dtor? As it turns out, it holds owning references to pretty much everything that's needed for flushing. Did you say pretty much? Yes, there are a lot of un-owned references in live_model_impl as well but they look related to initialization only. Life is too short otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Although looks like there is some consistent issue with indentation (maybe spaces vs tabs?)
Yes, formatting is all bad because I used VS which I can't figure out how to make it respect our style. I'll fix it using clang-fmt before committing. |
parser.py can will now parse all preamble messages in a file.
rl.net.cli was not disposing its live model, now it does.
Introduced some basic logging to the batching process so we can do basic monitoring without having to a debugger or adding printf statements.
The extra logging turned out to be a problem because at-exit flushing was done from async_batch dtor and accessing a bunch of dangling pointers - fun stuff!
I fixed that by moving the flushing to live_model_impl, which owns everything so its dtor can do it safely.