elastic2-doc-manager icon indicating copy to clipboard operation
elastic2-doc-manager copied to clipboard

Not honoring auto-commit-interval setting

Open luisobo opened this issue 8 years ago • 1 comments

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

luisobo avatar Jun 13 '16 19:06 luisobo

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.

ShaneHarvey avatar Sep 16 '16 00:09 ShaneHarvey