-
Notifications
You must be signed in to change notification settings - Fork 649
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
Skip secondary indexes during replay #1918
Skip secondary indexes during replay #1918
Conversation
Measured a speedup of 2% for replaying 40M blocks. |
b45a4b2
to
8d263e1
Compare
Rebased to resolve conflict |
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.
Good job. Thanks.
tests/common/database_fixture.cpp
Outdated
auto current_test_suite_id = boost::unit_test::framework::current_test_case().p_parent_id; | ||
const auto current_test_name = boost::unit_test::framework::current_test_case().p_name.value; | ||
const auto current_test_suite_id = boost::unit_test::framework::current_test_case().p_parent_id; | ||
const auto current_suite_name = boost::unit_test::framework::get<boost::unit_test::test_suite>(current_test_suite_id) |
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.
Unfortunately this line is still too long, ideally at maximum 117 characters per line.
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.
Hm, now I see only 109 chars in the github diff view. ISTR that I used to see more.
Also it seems to depend on font size now (smaller font means more chars), but I'm sure I tried that before too and it didn't have an effect.
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.
Github is great and is always improving. There is a feature request: https://github.community/t5/How-to-use-Git-and-GitHub/Feature-Request-Increase-Unified-Diff-Width-to-120-Characters/m-p/30157
BTW there are tools to change the width in individual browsers, e.g. Wide Github for Chrome, Stylish for Firefox and Fathub for running in web dev console.
@@ -59,6 +59,8 @@ namespace graphene { namespace chain { | |||
using std::cout; | |||
using std::cerr; | |||
|
|||
namespace buf = boost::unit_test::framework; |
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.
buf
is a commonly used abbreviation of buffer
, which usually appears as a local variable or a function argument. I hope we don't use it in tests.
Fixes #452
Fixes #683
The indexes handled here are not used by consensus code. There's no need to update them during replay.
Two indexes have been moved into
api_helper_indexes
plugin.The
grouped_orders
plugin has been modified to add its secondary index after replay, in the same way thatapi_helper_indexes
does it.I believe the risk I mentioned in #683 (comment) is sufficiently low.
Haven't measured speedup yet.