mirror of https://github.com/apache/lucene.git
sync the buggy methods in LiveIWC, instead of all operations from all RIWs...
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1593517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
37a2466338
commit
a1a0b561cd
|
@ -248,7 +248,7 @@ public class LiveIndexWriterConfig {
|
|||
* if ramBufferSize is enabled but non-positive, or it disables
|
||||
* ramBufferSize when maxBufferedDocs is already disabled
|
||||
*/
|
||||
public LiveIndexWriterConfig setRAMBufferSizeMB(double ramBufferSizeMB) {
|
||||
public synchronized LiveIndexWriterConfig setRAMBufferSizeMB(double ramBufferSizeMB) {
|
||||
if (ramBufferSizeMB != IndexWriterConfig.DISABLE_AUTO_FLUSH && ramBufferSizeMB <= 0.0) {
|
||||
throw new IllegalArgumentException("ramBufferSize should be > 0.0 MB when enabled");
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ public class LiveIndexWriterConfig {
|
|||
* if maxBufferedDocs is enabled but smaller than 2, or it disables
|
||||
* maxBufferedDocs when ramBufferSize is already disabled
|
||||
*/
|
||||
public LiveIndexWriterConfig setMaxBufferedDocs(int maxBufferedDocs) {
|
||||
public synchronized LiveIndexWriterConfig setMaxBufferedDocs(int maxBufferedDocs) {
|
||||
if (maxBufferedDocs != IndexWriterConfig.DISABLE_AUTO_FLUSH && maxBufferedDocs < 2) {
|
||||
throw new IllegalArgumentException("maxBufferedDocs must at least be 2 when enabled");
|
||||
}
|
||||
|
|
|
@ -1034,7 +1034,7 @@ public abstract class LuceneTestCase extends Assert {
|
|||
}
|
||||
|
||||
// if you want it in LiveIndexWriterConfig: it must and will be tested here.
|
||||
public static synchronized void maybeChangeLiveIndexWriterConfig(Random r, LiveIndexWriterConfig c) {
|
||||
public static void maybeChangeLiveIndexWriterConfig(Random r, LiveIndexWriterConfig c) {
|
||||
boolean didChange = false;
|
||||
|
||||
if (rarely(r)) {
|
||||
|
|
Loading…
Reference in New Issue