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

Make sure ICommitter.commit() is only called once #6

Closed
essiembre opened this issue Mar 2, 2016 · 1 comment
Closed

Make sure ICommitter.commit() is only called once #6

essiembre opened this issue Mar 2, 2016 · 1 comment

Comments

@essiembre
Copy link
Contributor

This ticket originated from Norconex/committer-elasticsearch#3 (comment).

Because of AbstractBatchCommitter calling commit() for every batch, this eliminates knowing when commit was actually called by the framework using the committer (e.g. crawler).

Actual commit operations should be delegated to an inner method and commit() would be available to overriding for those interested to know when it was actually called externally.

Alternative to consider: shall we have the equivalent of a close() method? This would force everybody using it to close each committer which is an extra burden that may not be super useful if we make sure commit() is only called at the end. Yet, since we cannot guarantee implementers will only call commit() at the end, maybe a close() method is best? We could have the ICommitter extends Closeable as well to help force people call the close method.

@essiembre
Copy link
Contributor Author

This issue has been moved here: Norconex/committer-core#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant