On 8/24/2017 4:59 AM, Angel Todorov wrote:
> I also tested, of course, by setting a value of 0, expecting that it would
> work in the way I expect it to , but unfortunately - it doesn't. Nothing is
> committed in that case.

Settings of zero turn that part of the automatic commit off.  That's a
way for people to have the setting in their config but not have the
setting active.

I think I may have found the off-by-one problem in the CommitTracker
code.  In the master branch, line 161 reads:

      if (docs == docsUpperBound + 1) {

Based on how the source object for the "docs" variable is handled, I
think it should probably be:

      if (docs >= docsUpperBound) {

While what you have seen does look like a bug to me, and something that
I think should be fixed, configuring values that low is generally a bad
idea.  Commits that open a new searcher require a fair amount of time
and cpu/memory resources to complete -- even soft commits.  They should
not be configured to happen extremely frequently, which a single-digit
maxDocs value will do.  That is likely to cause overlapping commits,
which can quickly become a major performance issue.

Configuring only maxTime usually results in more predictable operation
than maxDocs.

Thanks,
Shawn

Reply via email to