mirror of https://github.com/apache/lucene.git
obtain(long) never really waited for the lock to go away (#33799)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@179414 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17d02d8f2f
commit
5edb98e537
|
@ -155,6 +155,10 @@ Bug fixes
|
|||
on such automatically generated queries are no longer penalized
|
||||
for not matching all terms. (Doug Cutting, Patch #33472)
|
||||
|
||||
7. Getting a lock file with Lock.obtain(long) was supposed to wait for
|
||||
a given amount of milliseconds, but this didn't work.
|
||||
(John Wang via Daniel Naber, Bug #33799)
|
||||
|
||||
Optimizations
|
||||
|
||||
1. Disk usage (peak requirements during indexing and optimization)
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class Lock {
|
|||
int maxSleepCount = (int)(lockWaitTimeout / LOCK_POLL_INTERVAL);
|
||||
int sleepCount = 0;
|
||||
while (!locked) {
|
||||
if (++sleepCount == maxSleepCount) {
|
||||
if (sleepCount++ == maxSleepCount) {
|
||||
throw new IOException("Lock obtain timed out: " + this.toString());
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue