elastic2-doc-manager
elastic2-doc-manager copied to clipboard
Not honoring auto-commit-interval setting
Seems like this doc manager is not honoring the autoCommitInterval option. Seems like the the commit
method is being called on every update here, on top of the scheduled commit.
Currently, if autoCommitInterval is 0 or null, it will instruct ES to refresh on every index call, which is the desired behavior. If autoCommitInterval is an number N greater than zero, the doc manager will call refresh every N seconds, which is also the desired behavior.
I believe that by simply removing the line I linked the setting will be honored, is this correct?
Thanks
Hi @luisobo, the self.commit()
is necessary to ensure that we read the most up to date version of the document and apply the changes to that.
You may want to follow this mongo-connector issue which deals with this problem by batching up updates and uses Elastics bulk updates. It looks like it will bring some exciting performance improvements.