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

Projects
None yet
2 participants
@oxarbitrage
Copy link
Member

commented Jan 25, 2019

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

This comment has been minimized.

Copy link
@pmconrad

pmconrad Jan 26, 2019

Contributor

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) {

This comment has been minimized.

Copy link
@pmconrad

pmconrad Jan 26, 2019

Contributor

Can remove the == 0 check here, since if it is 0 then block_number will always be greater than that.

@oxarbitrage

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2019

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

@pmconrad
Copy link
Contributor

left a comment

Looks good, thanks!

@oxarbitrage oxarbitrage merged commit ee18179 into bitshares:develop Jan 30, 2019

1 of 2 checks passed

ci/dockercloud Your tests failed in Docker Cloud
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.