Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
add option elasticsearch-start-es-after-block to es plugin #1458
Will start inserting after specified block has passed, example usage:
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.
Code looks good, but I'm unsure if this is a desirable feature. It's probably a good way to shoot yourself in the foot, by supplying the wrong block number.
Most ES node operators are savvy enough to do this properly imho.
If unsure what you're doing you should always sync from scratch.
The setup doesn't allow duplicates anyway so starting further back is not an issue.
I'm gonna give this patch a go to restart my ES node when the proposal patch is done.
In conversations with @clockworkgr there are several use cases that you want to start adding data to ES after a specific block number such as:
Plus the main purpose of bringing a crashed ES node back confirmed by clockwork that was able to bring his es node back in a few mins after mainnet patch was released(#1479)
LIB is a good idea but the specific option should be also available so i am merging this as it is.