Skip to content
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

Merged

Conversation

oxarbitrage
Copy link
Member

Adds es-objects-start-es-after-block to es-objects plugin which is similar to elasticsearch-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.

@@ -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
Copy link
Contributor

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) {
Copy link
Contributor

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.

@oxarbitrage
Copy link
Member Author

Thank you @pmconrad . I followed your suggestions in elasticsearch plugin also as it haves the same argument.

@oxarbitrage oxarbitrage added this to the 201902 - Feature Release milestone Jan 29, 2019
Copy link
Contributor

@pmconrad pmconrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants