-
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
add es-objects-start-es-after-block option #1541
add es-objects-start-es-after-block option #1541
Conversation
@@ -63,6 +63,7 @@ class es_objects_plugin_impl | |||
bool _es_objects_limit_orders = true; | |||
bool _es_objects_asset_bitasset = true; | |||
std::string _es_objects_index_prefix = "objects-"; | |||
uint32_t _es_objects_start_es_after_block = 0; // disabled |
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.
No special handling needed for value 0 - it simply means start immediately.
remove_from_database(ba->id, "bitasset"); | ||
else | ||
prepareTemplate<asset_bitasset_data_object>(*ba, "bitasset"); | ||
if(_es_objects_start_es_after_block == 0 || block_number > _es_objects_start_es_after_block) { |
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.
Can remove the == 0 check here, since if it is 0 then block_number will always be greater than that.
Thank you @pmconrad . I followed your suggestions in |
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 good, thanks!
Adds
es-objects-start-es-after-block
to es-objects plugin which is similar toelasticsearch-start-es-after-block
for elasticsearch.Nodes can have crashes or other issues, this option is a time saver as it allow to skip blocks until we want, speeding up for example a reindex process.