add option elasticsearch-start-es-after-block to es plugin #1458
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1455
Will start inserting after specified block has passed, example usage:
./programs/witness_node/witness_node --plugins "elasticsearch" --elasticsearch-start-es-after-block 100000
In the first commit(5909b13) i add the check for the option right after getting a block.
In the second one(ee4cc4b) i modify that and place it much more inside the plugin logic. This is because i realized we were going to lose ID numeration, undos, total_ops, etc.
So at the end this basically don't add anything to the bulk buffer and by that will not send any data to elasticsearch.
I hope this alone can speed up the process when the node already have elasticsearch data up to a block but need testing. Any help with that is appreciated.