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:
Robert Muir 2014-05-09 12:04:38 +00:00
parent 37a2466338
commit a1a0b561cd
2 changed files with 3 additions and 3 deletions

View File

@ -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");
}

View File

@ -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)) {