-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Speculative logging support in Aptos VM #6708
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
looks great, it'd be good to try it out on some workload that previously output speculative logs
// TODO: Consider using SpeculativeCounter to increase CRITICAL_ERRORS | ||
// on the critical path instead of async dispatching. | ||
error!(self.context, "{}", self.message); | ||
CRITICAL_ERRORS.inc(); |
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.
hmm, is every single error message in vm considered critical error?
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.
It was like this so I kept the behavior, but yeah, weird. Why not just alert on "error"
949ea11
to
9496e35
Compare
@danielxiangzl - could you try your new PR with Dario's txn load generator - it has module publishing and reading conflicts. So without this PR it should print the storage errors, and with this it shouldn't. It would check the clear for fallback, but it's better than nothing. @zekun000 any ideas on how to check actual logs from speculative, later aborted txn executions? @igor-aptos may know how to run (executor?) benchmark with Dario's transactions? (publishing etc) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
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.
this is really cool, now we'll stop getting errant messages and alerts firing due to behavior that won't actually be committed / violate the blockstm semantics?
thx, yep! some outstanding issues to follow-up on but should improve the state of things atm. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I checked hacked speculative logging into one of the proptests and verified it works - i.e. it ensures only one log appears per transaction when speculative logging is enabled. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Speculative state helper is a separate (and well-tested) crate now, this integrates into aptos-vm, initializes per every block and flushes at the end of block execution.
speculative logs are cleared on parallel execution abort, and also all logs are cleared during module r/w fallback to sequential execution.
the drawback of this approach currently, as brought up by @wrwg is that if there are crashes, we may not log some entries stuck in the speculative buffer. I will create a github issue for tracking and fixing this (i.e. by rolling commit granularity, or something flushing on crash/panic handlers, etc), but the current PR if all works as intended, should still provide an incremental improvement to what we have now. Once landed, it will also allow @danielxiangzl to proceed w. early termination PR for parallel execution -> and then supporting per block limits.
Another limitation is that this is currently for aptos-vm only, logs coming from move-vm are unaffected.