Return-Path: X-Original-To: apmail-lucene-commits-archive@www.apache.org Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D39C710E9D for ; Wed, 29 Jan 2014 11:15:32 +0000 (UTC) Received: (qmail 7144 invoked by uid 500); 29 Jan 2014 11:15:31 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 6909 invoked by uid 99); 29 Jan 2014 11:15:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jan 2014 11:15:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jan 2014 11:15:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7B3ED23888E2; Wed, 29 Jan 2014 11:15:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1562403 [1/7] - in /lucene/dev/branches/lucene5376: ./ dev-tools/ dev-tools/idea/lucene/suggest/ dev-tools/idea/solr/core/src/java/ lucene/ lucene/analysis/ lucene/analysis/common/ lucene/analysis/common/src/java/org/apache/lucene/analysis... Date: Wed, 29 Jan 2014 11:14:56 -0000 To: commits@lucene.apache.org From: mikemccand@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140129111503.7B3ED23888E2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mikemccand Date: Wed Jan 29 11:14:53 2014 New Revision: 1562403 URL: http://svn.apache.org/r1562403 Log: LUCENE-5376: sync trunk Added: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java - copied unchanged from r1562396, lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java lucene/dev/branches/lucene5376/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/MultiTermHighlighting.java - copied unchanged from r1562396, lucene/dev/trunk/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/MultiTermHighlighting.java lucene/dev/branches/lucene5376/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestMultiTermHighlighting.java - copied unchanged from r1562396, lucene/dev/trunk/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestMultiTermHighlighting.java lucene/dev/branches/lucene5376/lucene/licenses/spatial4j-0.4.jar.sha1 - copied unchanged from r1562396, lucene/dev/trunk/lucene/licenses/spatial4j-0.4.jar.sha1 lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/SpatialTestData.java - copied unchanged from r1562396, lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/SpatialTestData.java lucene/dev/branches/lucene5376/lucene/suggest/src/java/org/apache/lucene/search/suggest/DocumentValueSourceDictionary.java - copied unchanged from r1562396, lucene/dev/trunk/lucene/suggest/src/java/org/apache/lucene/search/suggest/DocumentValueSourceDictionary.java lucene/dev/branches/lucene5376/lucene/suggest/src/test/org/apache/lucene/search/suggest/DocumentValueSourceDictionaryTest.java - copied unchanged from r1562396, lucene/dev/trunk/lucene/suggest/src/test/org/apache/lucene/search/suggest/DocumentValueSourceDictionaryTest.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/store/blockcache/Store.java - copied unchanged from r1562396, lucene/dev/trunk/solr/core/src/java/org/apache/solr/store/blockcache/Store.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/util/SpatialUtils.java - copied unchanged from r1562396, lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SpatialUtils.java lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/collection1/conf/schema-customfield.xml - copied unchanged from r1562396, lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/schema-customfield.xml lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/schema/MyCrazyCustomField.java - copied unchanged from r1562396, lucene/dev/trunk/solr/core/src/test/org/apache/solr/schema/MyCrazyCustomField.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/schema/TrieIntPrefixActsAsRangeQueryFieldType.java - copied unchanged from r1562396, lucene/dev/trunk/solr/core/src/test/org/apache/solr/schema/TrieIntPrefixActsAsRangeQueryFieldType.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestOverriddenPrefixQueryForCustomFieldType.java - copied unchanged from r1562396, lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestOverriddenPrefixQueryForCustomFieldType.java lucene/dev/branches/lucene5376/solr/licenses/spatial4j-0.4.jar.sha1 - copied unchanged from r1562396, lucene/dev/trunk/solr/licenses/spatial4j-0.4.jar.sha1 Removed: lucene/dev/branches/lucene5376/lucene/licenses/spatial4j-0.3.jar.sha1 lucene/dev/branches/lucene5376/lucene/suggest/src/java/org/apache/lucene/search/suggest/DocumentExpressionDictionary.java lucene/dev/branches/lucene5376/lucene/suggest/src/test/org/apache/lucene/search/suggest/DocumentExpressionDictionaryTest.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java lucene/dev/branches/lucene5376/solr/licenses/spatial4j-0.3.jar.sha1 Modified: lucene/dev/branches/lucene5376/ (props changed) lucene/dev/branches/lucene5376/dev-tools/ (props changed) lucene/dev/branches/lucene5376/dev-tools/idea/lucene/suggest/suggest.iml lucene/dev/branches/lucene5376/dev-tools/idea/solr/core/src/java/solr-core.iml lucene/dev/branches/lucene5376/lucene/ (props changed) lucene/dev/branches/lucene5376/lucene/CHANGES.txt (contents, props changed) lucene/dev/branches/lucene5376/lucene/analysis/ (props changed) lucene/dev/branches/lucene5376/lucene/analysis/common/ (props changed) lucene/dev/branches/lucene5376/lucene/analysis/common/build.xml lucene/dev/branches/lucene5376/lucene/analysis/common/src/java/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapper.java lucene/dev/branches/lucene5376/lucene/benchmark/ (props changed) lucene/dev/branches/lucene5376/lucene/benchmark/build.xml lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/GeonamesLineParser.java lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java lucene/dev/branches/lucene5376/lucene/common-build.xml (contents, props changed) lucene/dev/branches/lucene5376/lucene/core/ (props changed) lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/AutomatonQuery.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/Lock.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockReleaseFailedException.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NoLockFactory.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SingleInstanceLockFactory.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestDirectory.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLock.java lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLockFactory.java lucene/dev/branches/lucene5376/lucene/highlighter/ (props changed) lucene/dev/branches/lucene5376/lucene/highlighter/src/java/org/apache/lucene/search/postingshighlight/PostingsHighlighter.java lucene/dev/branches/lucene5376/lucene/ivy-versions.properties (contents, props changed) lucene/dev/branches/lucene5376/lucene/join/ (props changed) lucene/dev/branches/lucene5376/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java lucene/dev/branches/lucene5376/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java lucene/dev/branches/lucene5376/lucene/licenses/ (props changed) lucene/dev/branches/lucene5376/lucene/licenses/spatial4j-NOTICE.txt lucene/dev/branches/lucene5376/lucene/queryparser/ (props changed) lucene/dev/branches/lucene5376/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNode.java lucene/dev/branches/lucene5376/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java lucene/dev/branches/lucene5376/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/core/nodes/TestQueryNode.java lucene/dev/branches/lucene5376/lucene/queryparser/src/test/org/apache/lucene/queryparser/util/QueryParserTestBase.java lucene/dev/branches/lucene5376/lucene/spatial/ (props changed) lucene/dev/branches/lucene5376/lucene/spatial/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/cities-Intersects-BBox.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/data/countries-bbox.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/data/simple-bbox.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/data/states-bbox.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/data/world-cities-points.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/simple-Queries-BBox.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/states-Intersects-BBox.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test-files/states-IsWithin-BBox.txt lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/SpatialExample.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/SpatialTestQuery.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/TestTestFramework.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/SpatialOpRecursivePrefixTreeTest.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java lucene/dev/branches/lucene5376/lucene/spatial/src/test/org/apache/lucene/spatial/query/SpatialArgsParserTest.java lucene/dev/branches/lucene5376/lucene/suggest/ (props changed) lucene/dev/branches/lucene5376/lucene/suggest/build.xml lucene/dev/branches/lucene5376/lucene/test-framework/ (props changed) lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/store/MockLockFactoryWrapper.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java lucene/dev/branches/lucene5376/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java lucene/dev/branches/lucene5376/solr/ (props changed) lucene/dev/branches/lucene5376/solr/CHANGES.txt (contents, props changed) lucene/dev/branches/lucene5376/solr/core/ (props changed) lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/core/CoreContainer.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/handler/SnapShooter.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/handler/loader/JavabinLoader.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/highlight/PostingsSolrHighlighter.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/schema/BinaryField.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/schema/FieldType.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/schema/GeoHashField.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/schema/LatLonType.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/schema/PointType.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/Grouping.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/PrefixQParserPlugin.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/SimpleQParserPlugin.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/function/distance/SquaredEuclideanFunction.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/function/distance/VectorDistanceFunction.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/DocumentExpressionDictionaryFactory.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/store/blockcache/BlockDirectory.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/store/blockcache/BufferStore.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/store/blockcache/CustomBufferedIndexInput.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/store/blockcache/ReusedBufferedIndexOutput.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/store/hdfs/HdfsDirectory.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/store/hdfs/HdfsLockFactory.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/HdfsUpdateLog.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/PeerSync.java lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/VersionInfo.java lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/collection1/conf/schema-sorts.xml lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/collection1/conf/schema-spatial.xml lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/solr-no-core-old-style.xml lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/solr-no-core.xml lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/solr.xml lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/CursorPagingTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analytics/AbstractAnalyticsStatsTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/CustomCollectionTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/DistribCursorPagingTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/highlight/TestPostingsSolrHighlighter.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java lucene/dev/branches/lucene5376/solr/example/ (props changed) lucene/dev/branches/lucene5376/solr/example/example-DIH/solr/db/conf/db-data-config.xml lucene/dev/branches/lucene5376/solr/licenses/ (props changed) lucene/dev/branches/lucene5376/solr/licenses/spatial4j-NOTICE.txt lucene/dev/branches/lucene5376/solr/solrj/ (props changed) lucene/dev/branches/lucene5376/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServer.java lucene/dev/branches/lucene5376/solr/solrj/src/java/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java lucene/dev/branches/lucene5376/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java lucene/dev/branches/lucene5376/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java lucene/dev/branches/lucene5376/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java lucene/dev/branches/lucene5376/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java lucene/dev/branches/lucene5376/solr/test-framework/ (props changed) lucene/dev/branches/lucene5376/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java lucene/dev/branches/lucene5376/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java Modified: lucene/dev/branches/lucene5376/dev-tools/idea/lucene/suggest/suggest.iml URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/dev-tools/idea/lucene/suggest/suggest.iml?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/dev-tools/idea/lucene/suggest/suggest.iml (original) +++ lucene/dev/branches/lucene5376/dev-tools/idea/lucene/suggest/suggest.iml Wed Jan 29 11:14:53 2014 @@ -12,7 +12,6 @@ - Modified: lucene/dev/branches/lucene5376/dev-tools/idea/solr/core/src/java/solr-core.iml URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/dev-tools/idea/solr/core/src/java/solr-core.iml?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/dev-tools/idea/solr/core/src/java/solr-core.iml (original) +++ lucene/dev/branches/lucene5376/dev-tools/idea/solr/core/src/java/solr-core.iml Wed Jan 29 11:14:53 2014 @@ -22,6 +22,7 @@ + Modified: lucene/dev/branches/lucene5376/lucene/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/CHANGES.txt?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/CHANGES.txt (original) +++ lucene/dev/branches/lucene5376/lucene/CHANGES.txt Wed Jan 29 11:14:53 2014 @@ -57,6 +57,8 @@ API Changes * LUCENE-5388: Remove Reader from Tokenizer's constructor. (Benson Margulies via Robert Muir - pull request #16) +* LUCENE-5405: Make ShingleAnalzyerWrapper.getWrappedAnalyzer() public final (gsingers) + Documentation * LUCENE-5392: Add/improve analysis package documentation to reflect @@ -102,7 +104,20 @@ New Features using SortField.setMissingValue(SortField.STRING_FIRST), or last, using SortField.setMissingValue(SortField.STRING_LAST). (Rob Muir, Mike McCandless) + +* LUCENE-5099: QueryNode should have the ability to detach from its node + parent. Added QueryNode.removeFromParent() that allows nodes to be + detached from its parent node. (Adriano Crestani) + +* LUCENE-5395: Upgrade Spatial4j 0.4: Parses WKT (including ENVELOPE) with + extension "BUFFER"; buffering a point results in a Circle. JTS isn't needed + for WKT any more but remains required for Polygons. New Shapes: + ShapeCollection and BufferedLineString. Various other improvements and bug + fixes too. More info: + https://github.com/spatial4j/spatial4j/blob/master/CHANGES.md (David Smiley) +* LUCENE-5415: Add multitermquery (wildcards,prefix,etc) to PostingsHighlighter. + (Mike McCandless, Robert Muir) Build @@ -137,6 +152,9 @@ Build * LUCENE-5383: fix changes2html to link pull requests (Steve Rowe) +* LUCENE-5411: Upgrade to released JFlex 1.5.0; stop requiring + a locally built JFlex snapshot jar. (Steve Rowe) + Bug fixes * LUCENE-5285: Improved highlighting of multi-valued fields with @@ -173,12 +191,42 @@ Bug fixes preventing wrong term positions for fields that use StringTokenStream. (Michael Busch) +* LUCENE-5377: IndexWriter.addIndexes(Directory[]) would cause corruption + on Lucene 4.6 if any index segments were Lucene 4.0-4.5. + (Littlestar, Mike McCandless, Shai Erera, Robert Muir) + +* SOLR-5661: PriorityQueue now refuses to allocate itself if the + incoming maxSize is too large (Raintung Li via Mike McCandless) + +* LUCENE-5228: IndexWriter.addIndexes(Directory[]) now acquires a + write lock in each Directory, to ensure that no open IndexWriter is + changing the incoming indices. This also means that you cannot pass + the same Directory to multiple concurrent addIndexes calls (which is + anyways unusual). (Robert Muir, Mike McCandless) + +* LUCENE-5415: SpanMultiTermQueryWrapper didn't handle its boost in + hashcode/equals/tostring/rewrite. (Robert Muir) + +* LUCENE-5409: ToParentBlockJoinCollector.getTopGroups would fail to + return any groups when the joined query required more than one + rewrite step (Peng Cheng via Mike McCandless) + API Changes * LUCENE-5339: The facet module was simplified/reworked to make the APIs more approachable to new users. (Shai Erera, Gilad Barkai, Rob Muir, Mike McCandless) +* LUCENE-5395: The SpatialArgsParser now only reads WKT, no more "lat, lon" + etc. but it's easy to override the parseShape method if you wish. (David + Smiley) + +* LUCENE-5414: DocumentExpressionDictionary was renamed to + DocumentValueSourceDictionary and all dependencies to the lucene-expression + module were removed from lucene-suggest. DocumentValueSourceDictionary now + only accepts a ValueSource instead of a convenience ctor for an expression + string. (Simon Willnauer) + Optimizations * LUCENE-5372: Replace StringBuffer by StringBuilder, where possible. Modified: lucene/dev/branches/lucene5376/lucene/analysis/common/build.xml URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/analysis/common/build.xml?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/analysis/common/build.xml (original) +++ lucene/dev/branches/lucene5376/lucene/analysis/common/build.xml Wed Jan 29 11:14:53 2014 @@ -29,7 +29,7 @@ - @@ -40,11 +40,7 @@ - - - + depends="init,generate-jflex-html-char-entities"> @@ -65,25 +61,16 @@ - - - - + - - - - + - - - - + Modified: lucene/dev/branches/lucene5376/lucene/analysis/common/src/java/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapper.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/analysis/common/src/java/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapper.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/analysis/common/src/java/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapper.java (original) +++ lucene/dev/branches/lucene5376/lucene/analysis/common/src/java/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapper.java Wed Jan 29 11:14:53 2014 @@ -138,7 +138,7 @@ public final class ShingleAnalyzerWrappe } @Override - protected Analyzer getWrappedAnalyzer(String fieldName) { + public final Analyzer getWrappedAnalyzer(String fieldName) { return delegate; } Modified: lucene/dev/branches/lucene5376/lucene/benchmark/build.xml URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/benchmark/build.xml?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/benchmark/build.xml (original) +++ lucene/dev/branches/lucene5376/lucene/benchmark/build.xml Wed Jan 29 11:14:53 2014 @@ -67,7 +67,7 @@ - + Modified: lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/GeonamesLineParser.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/GeonamesLineParser.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/GeonamesLineParser.java (original) +++ lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/GeonamesLineParser.java Wed Jan 29 11:14:53 2014 @@ -39,6 +39,8 @@ public class GeonamesLineParser extends docData.setID(Integer.parseInt(parts[0]));//note: overwrites ID assigned by LineDocSource docData.setName(parts[1]); - docData.setBody(parts[4]+","+parts[5]); // latitude , longitude + String latitude = parts[4]; + String longitude = parts[5]; + docData.setBody("POINT("+longitude+" "+latitude+")");//WKT is x y order } } Modified: lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java (original) +++ lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java Wed Jan 29 11:14:53 2014 @@ -190,7 +190,7 @@ public class SpatialDocMaker extends Doc public static Shape makeShapeFromString(SpatialStrategy strategy, String name, String shapeStr) { if (shapeStr != null && shapeStr.length() > 0) { try { - return strategy.getSpatialContext().readShape(shapeStr); + return strategy.getSpatialContext().readShapeFromWkt(shapeStr); } catch (Exception e) {//InvalidShapeException TODO System.err.println("Shape "+name+" wasn't parseable: "+e+" (skipping it)"); return null; Modified: lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java (original) +++ lucene/dev/branches/lucene5376/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialFileQueryMaker.java Wed Jan 29 11:14:53 2014 @@ -36,7 +36,7 @@ import java.util.Properties; /** * Reads spatial data from the body field docs from an internally created {@link LineDocSource}. - * It's parsed by {@link com.spatial4j.core.context.SpatialContext#readShape(String)} and then + * It's parsed by {@link com.spatial4j.core.context.SpatialContext#readShapeFromWkt(String)} (String)} and then * further manipulated via a configurable {@link SpatialDocMaker.ShapeConverter}. When using point * data, it's likely you'll want to configure the shape converter so that the query shapes actually * cover a region. The queries are all created & cached in advance. This query maker works in Modified: lucene/dev/branches/lucene5376/lucene/common-build.xml URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/common-build.xml?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/common-build.xml (original) +++ lucene/dev/branches/lucene5376/lucene/common-build.xml Wed Jan 29 11:14:53 2014 @@ -227,17 +227,6 @@ - - - - - - - - - - - @@ -472,31 +461,6 @@ - - - - -   - ################################################################## - JFlex not found. - JFlex Home: ${jflex.home} - - Please install the jFlex 1.5 version (currently not released) - from its SVN repository: - - svn co -r 722 https://svn.code.sf.net/p/jflex/code/trunk jflex - cd jflex - mvn install - - Then, create a build.properties file either in your home - directory, or within the Lucene directory and set the jflex.home - property to the path where the JFlex trunk checkout is located - (in the above example it's the directory called "jflex"). - - ################################################################## - - - - + + + + + + + + acquireWriteLocks(Directory... dirs) throws IOException { + List locks = new ArrayList(); + for(int i=0;i - * NOTE: the index in each {@link Directory} must not be - * changed (opened by a writer) while this method is - * running. This method does not acquire a write lock in - * each input Directory, so it is up to the caller to - * enforce this. + * NOTE: this method acquires the write lock in + * each directory, to ensure that no {@code IndexWriter} + * is currently open or tries to open while this is + * running. * *

This method is transactional in how Exceptions are * handled: it does not commit a new segments_N file until @@ -2401,12 +2422,18 @@ public class IndexWriter implements Clos * * @throws CorruptIndexException if the index is corrupt * @throws IOException if there is a low-level IO error + * @throws LockObtainFailedException if we were unable to + * acquire the write lock in at least one directory */ public void addIndexes(Directory... dirs) throws IOException { ensureOpen(); noDupDirs(dirs); + List locks = acquireWriteLocks(dirs); + + boolean successTop = false; + try { if (infoStream.isEnabled("IW")) { infoStream.message("IW", "flush at addIndexes(Directory...)"); @@ -2477,8 +2504,16 @@ public class IndexWriter implements Clos checkpoint(); } + successTop = true; + } catch (OutOfMemoryError oom) { handleOOM(oom, "addIndexes(Directory...)"); + } finally { + if (successTop) { + IOUtils.close(locks); + } else { + IOUtils.closeWhileHandlingException(locks); + } } } @@ -2893,12 +2928,15 @@ public class IndexWriter implements Clos commitInternal(); } - /** Returns true if there are changes that have not been - * committed. Note that if a merge kicked off as a - * result of flushing a new segment during {@link - * #commit}, or a concurrent merged finished, - * this method may return true right after you - * had just called {@link #commit}. */ + /** Returns true if there may be changes that have not been + * committed. There are cases where this may return true + * when there are no actual "real" changes to the index, + * for example if you've deleted by Term or Query but + * that Term or Query does not match any documents. + * Also, if a merge kicked off as a result of flushing a + * new segment during {@link #commit}, or a concurrent + * merged finished, this method may return true right + * after you had just called {@link #commit}. */ public final boolean hasUncommittedChanges() { return changeCount != lastCommitChangeCount || docWriter.anyChanges() || bufferedUpdatesStream.any(); } @@ -4408,7 +4446,7 @@ public class IndexWriter implements Clos * currently accessing this index. */ public static void unlock(Directory directory) throws IOException { - directory.makeLock(IndexWriter.WRITE_LOCK_NAME).release(); + directory.makeLock(IndexWriter.WRITE_LOCK_NAME).close(); } /** If {@link DirectoryReader#open(IndexWriter,boolean)} has Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/AutomatonQuery.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/AutomatonQuery.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/AutomatonQuery.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/AutomatonQuery.java Wed Jan 29 11:14:53 2014 @@ -128,4 +128,9 @@ public class AutomatonQuery extends Mult buffer.append(ToStringUtils.boost(getBoost())); return buffer.toString(); } + + /** Returns the automaton used to create this query */ + public Automaton getAutomaton() { + return automaton; + } } Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java Wed Jan 29 11:14:53 2014 @@ -62,8 +62,9 @@ public class BooleanQuery extends Query * Default value is 1024. */ public static void setMaxClauseCount(int maxClauseCount) { - if (maxClauseCount < 1) + if (maxClauseCount < 1) { throw new IllegalArgumentException("maxClauseCount must be >= 1"); + } BooleanQuery.maxClauseCount = maxClauseCount; } @@ -138,8 +139,9 @@ public class BooleanQuery extends Query * @see #getMaxClauseCount() */ public void add(BooleanClause clause) { - if (clauses.size() >= maxClauseCount) + if (clauses.size() >= maxClauseCount) { throw new TooManyClauses(); + } clauses.add(clause); } @@ -182,7 +184,9 @@ public class BooleanQuery extends Query BooleanClause c = clauses.get(i); Weight w = c.getQuery().createWeight(searcher); weights.add(w); - if (!c.isProhibited()) maxCoord++; + if (!c.isProhibited()) { + maxCoord++; + } } } @@ -195,9 +199,10 @@ public class BooleanQuery extends Query for (int i = 0 ; i < weights.size(); i++) { // call sumOfSquaredWeights for all clauses in case of side effects float s = weights.get(i).getValueForNormalization(); // sum sub weights - if (!clauses.get(i).isProhibited()) + if (!clauses.get(i).isProhibited()) { // only add to sum for non-prohibited clauses sum += s; + } } sum *= getBoost() * getBoost(); // boost each sub-weight @@ -258,8 +263,9 @@ public class BooleanQuery extends Query sumExpl.addDetail(r); fail = true; } - if (c.getOccur() == Occur.SHOULD) + if (c.getOccur() == Occur.SHOULD) { shouldMatchCount++; + } } else if (c.isRequired()) { Explanation r = new Explanation(0.0f, "no match on required clause (" + c.getQuery().toString() + ")"); r.addDetail(e); @@ -422,8 +428,9 @@ public class BooleanQuery extends Query } if (clone != null) { return clone; // some clauses rewrote - } else + } else { return this; // no clauses rewrote + } } // inherit javadoc @@ -447,17 +454,18 @@ public class BooleanQuery extends Query @Override public String toString(String field) { StringBuilder buffer = new StringBuilder(); - boolean needParens=(getBoost() != 1.0) || (getMinimumNumberShouldMatch()>0) ; + boolean needParens= getBoost() != 1.0 || getMinimumNumberShouldMatch() > 0; if (needParens) { buffer.append("("); } for (int i = 0 ; i < clauses.size(); i++) { BooleanClause c = clauses.get(i); - if (c.isProhibited()) + if (c.isProhibited()) { buffer.append("-"); - else if (c.isRequired()) + } else if (c.isRequired()) { buffer.append("+"); + } Query subQuery = c.getQuery(); if (subQuery != null) { @@ -472,8 +480,9 @@ public class BooleanQuery extends Query buffer.append("null"); } - if (i != clauses.size()-1) + if (i != clauses.size()-1) { buffer.append(" "); + } } if (needParens) { @@ -485,8 +494,7 @@ public class BooleanQuery extends Query buffer.append(getMinimumNumberShouldMatch()); } - if (getBoost() != 1.0f) - { + if (getBoost() != 1.0f) { buffer.append(ToStringUtils.boost(getBoost())); } @@ -496,10 +504,11 @@ public class BooleanQuery extends Query /** Returns true iff o is equal to this. */ @Override public boolean equals(Object o) { - if (!(o instanceof BooleanQuery)) + if (!(o instanceof BooleanQuery)) { return false; + } BooleanQuery other = (BooleanQuery)o; - return (this.getBoost() == other.getBoost()) + return this.getBoost() == other.getBoost() && this.clauses.equals(other.clauses) && this.getMinimumNumberShouldMatch() == other.getMinimumNumberShouldMatch() && this.disableCoord == other.disableCoord; Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java Wed Jan 29 11:14:53 2014 @@ -138,6 +138,14 @@ public class FuzzyQuery extends MultiTer public int getPrefixLength() { return prefixLength; } + + /** + * Returns true if transpositions should be treated as a primitive edit operation. + * If this is false, comparisons will implement the classic Levenshtein algorithm. + */ + public boolean getTranspositions() { + return transpositions; + } @Override protected TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException { Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java Wed Jan 29 11:14:53 2014 @@ -100,6 +100,11 @@ public class SpanMultiTermQueryWrapper other = (SpanMultiTermQueryWrapper) obj; + if (!query.equals(other.query)) return false; + return true; } /** Abstract class that defines how the query is rewritten. */ Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/Lock.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/Lock.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/Lock.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/Lock.java Wed Jan 29 11:14:53 2014 @@ -17,9 +17,11 @@ package org.apache.lucene.store; * limitations under the License. */ -import org.apache.lucene.util.ThreadInterruptedException; +import java.io.Closeable; import java.io.IOException; +import org.apache.lucene.util.ThreadInterruptedException; + /** An interprocess mutex lock. *

Typical use might look like:

  * new Lock.With(directory.makeLock("my.lock")) {
@@ -30,8 +32,10 @@ import java.io.IOException;
  * 
* * @see Directory#makeLock(String) + * + * @lucene.internal */ -public abstract class Lock { +public abstract class Lock implements Closeable { /** How long {@link #obtain(long)} waits, in milliseconds, * in between attempts to acquire the lock. */ @@ -42,7 +46,8 @@ public abstract class Lock { public static final long LOCK_OBTAIN_WAIT_FOREVER = -1; /** Attempts to obtain exclusive access and immediately return - * upon success or failure. + * upon success or failure. Use {@link #close} to + * release the lock. * @return true iff exclusive access is obtained */ public abstract boolean obtain() throws IOException; @@ -98,7 +103,7 @@ public abstract class Lock { } /** Releases exclusive access. */ - public abstract void release() throws IOException; + public abstract void close() throws IOException; /** Returns true if the resource is currently locked. Note that one must * still call {@link #obtain()} before using the resource. */ @@ -134,8 +139,9 @@ public abstract class Lock { locked = lock.obtain(lockWaitTimeout); return doBody(); } finally { - if (locked) - lock.release(); + if (locked) { + lock.close(); + } } } } Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockReleaseFailedException.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockReleaseFailedException.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockReleaseFailedException.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockReleaseFailedException.java Wed Jan 29 11:14:53 2014 @@ -22,7 +22,7 @@ import java.io.IOException; /** * This exception is thrown when the write.lock * could not be released. - * @see Lock#release() + * @see Lock#close() */ public class LockReleaseFailedException extends IOException { public LockReleaseFailedException(String message) { Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/LockStressTest.java Wed Jan 29 11:14:53 2014 @@ -102,7 +102,7 @@ public class LockStressTest { if (obtained) { System.out.print("l"); - l.release(); + l.close(); } Thread.sleep(sleepTimeMS); } Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NativeFSLockFactory.java Wed Jan 29 11:14:53 2014 @@ -107,7 +107,7 @@ public class NativeFSLockFactory extends // NOTE: makeLock fixes the lock name by prefixing it w/ lockPrefix. // Therefore it should be called before the code block next which prefixes // the given name. - makeLock(lockName).release(); + makeLock(lockName).close(); if (lockPrefix != null) { lockName = lockPrefix + "-" + lockName; @@ -259,7 +259,7 @@ class NativeFSLock extends Lock { } @Override - public synchronized void release() throws IOException { + public synchronized void close() throws IOException { if (lockExists()) { try { lock.release(); @@ -298,7 +298,7 @@ class NativeFSLock extends Lock { } } finally { if (obtained) { - release(); + close(); } } } @@ -317,7 +317,7 @@ class NativeFSLock extends Lock { // Try to obtain and release (if was locked) the lock try { boolean obtained = obtain(); - if (obtained) release(); + if (obtained) close(); return !obtained; } catch (IOException ioe) { return false; Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NoLockFactory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NoLockFactory.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NoLockFactory.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/NoLockFactory.java Wed Jan 29 11:14:53 2014 @@ -55,7 +55,7 @@ class NoLock extends Lock { } @Override - public void release() { + public void close() { } @Override Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SimpleFSLockFactory.java Wed Jan 29 11:14:53 2014 @@ -128,9 +128,10 @@ class SimpleFSLock extends Lock { } @Override - public void release() throws LockReleaseFailedException { - if (lockFile.exists() && !lockFile.delete()) + public void close() throws LockReleaseFailedException { + if (lockFile.exists() && !lockFile.delete()) { throw new LockReleaseFailedException("failed to delete " + lockFile); + } } @Override Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SingleInstanceLockFactory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SingleInstanceLockFactory.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SingleInstanceLockFactory.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/SingleInstanceLockFactory.java Wed Jan 29 11:14:53 2014 @@ -71,7 +71,7 @@ class SingleInstanceLock extends Lock { } @Override - public void release() { + public void close() { synchronized(locks) { locks.remove(lockName); } Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/store/VerifyingLockFactory.java Wed Jan 29 11:14:53 2014 @@ -87,10 +87,10 @@ public class VerifyingLockFactory extend } @Override - public synchronized void release() throws IOException { + public synchronized void close() throws IOException { if (isLocked()) { verify((byte) 0); - lock.release(); + lock.close(); } } } Modified: lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java Wed Jan 29 11:14:53 2014 @@ -41,11 +41,11 @@ public abstract class PriorityQueue { public PriorityQueue(int maxSize, boolean prepopulate) { size = 0; int heapSize; - if (0 == maxSize) + if (0 == maxSize) { // We allocate 1 extra to avoid if statement in top() heapSize = 2; - else { - if (maxSize == Integer.MAX_VALUE) { + } else { + if (maxSize > ArrayUtil.MAX_ARRAY_LENGTH) { // Don't wrap heapSize to -1, in this case, which // causes a confusing NegativeArraySizeException. // Note that very likely this will simply then hit @@ -54,7 +54,8 @@ public abstract class PriorityQueue { // in this case, but it's very unlikely in practice // one will actually insert this many objects into // the PQ: - heapSize = Integer.MAX_VALUE; + // Throw exception to prevent confusing OOME: + throw new IllegalArgumentException("maxSize must be <= " + ArrayUtil.MAX_ARRAY_LENGTH + "; got: " + maxSize); } else { // NOTE: we add +1 because all access to heap is // 1-based not 0-based. heap[0] is unused. @@ -183,8 +184,9 @@ public abstract class PriorityQueue { size--; downHeap(); // adjust heap return result; - } else + } else { return null; + } } /** Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java Wed Jan 29 11:14:53 2014 @@ -19,12 +19,18 @@ package org.apache.lucene.codecs.lucene4 import org.apache.lucene.codecs.Codec; import org.apache.lucene.index.BaseDocValuesFormatTestCase; +import org.junit.BeforeClass; /** * Tests Lucene40DocValuesFormat */ public class TestLucene40DocValuesFormat extends BaseDocValuesFormatTestCase { private final Codec codec = new Lucene40RWCodec(); + + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } @Override protected Codec getCodec() { Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java Wed Jan 29 11:14:53 2014 @@ -19,6 +19,7 @@ package org.apache.lucene.codecs.lucene4 import org.apache.lucene.codecs.Codec; import org.apache.lucene.index.BasePostingsFormatTestCase; +import org.junit.BeforeClass; /** * Tests Lucene40PostingsFormat @@ -26,6 +27,11 @@ import org.apache.lucene.index.BasePosti public class TestLucene40PostingsFormat extends BasePostingsFormatTestCase { private final Codec codec = new Lucene40RWCodec(); + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } + @Override protected Codec getCodec() { return codec; Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java Wed Jan 29 11:14:53 2014 @@ -34,6 +34,7 @@ import org.apache.lucene.index.Term; import org.apache.lucene.store.Directory; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; +import org.junit.BeforeClass; public class TestLucene40PostingsReader extends LuceneTestCase { static final String terms[] = new String[100]; @@ -42,6 +43,11 @@ public class TestLucene40PostingsReader terms[i] = Integer.toString(i+1); } } + + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } /** tests terms with different probabilities of being in the document. * depends heavily on term vectors cross-check at checkIndex Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java Wed Jan 29 11:14:53 2014 @@ -19,9 +19,15 @@ package org.apache.lucene.codecs.lucene4 import org.apache.lucene.codecs.Codec; import org.apache.lucene.index.BaseStoredFieldsFormatTestCase; +import org.junit.BeforeClass; public class TestLucene40StoredFieldsFormat extends BaseStoredFieldsFormatTestCase { + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } + @Override protected Codec getCodec() { return new Lucene40RWCodec(); Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java Wed Jan 29 11:14:53 2014 @@ -19,9 +19,15 @@ package org.apache.lucene.codecs.lucene4 import org.apache.lucene.codecs.Codec; import org.apache.lucene.index.BaseTermVectorsFormatTestCase; +import org.junit.BeforeClass; public class TestLucene40TermVectorsFormat extends BaseTermVectorsFormatTestCase { + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } + @Override protected Codec getCodec() { return new Lucene40RWCodec(); Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java Wed Jan 29 11:14:53 2014 @@ -37,10 +37,16 @@ import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LineFileDocs; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; +import org.junit.BeforeClass; // TODO: really this should be in BaseTestPF or somewhere else? useful test! public class TestReuseDocsEnum extends LuceneTestCase { + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } + public void testReuseDocsEnumNoReuse() throws IOException { Directory dir = newDirectory(); Codec cp = _TestUtil.alwaysPostingsFormat(new Lucene40RWPostingsFormat()); Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java Wed Jan 29 11:14:53 2014 @@ -19,9 +19,15 @@ package org.apache.lucene.codecs.lucene4 import org.apache.lucene.codecs.Codec; import org.apache.lucene.index.BaseStoredFieldsFormatTestCase; +import org.junit.BeforeClass; public class TestLucene41StoredFieldsFormat extends BaseStoredFieldsFormatTestCase { + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } + @Override protected Codec getCodec() { return new Lucene41RWCodec(); Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java Wed Jan 29 11:14:53 2014 @@ -19,6 +19,7 @@ package org.apache.lucene.codecs.lucene4 import org.apache.lucene.codecs.Codec; import org.apache.lucene.index.BaseCompressingDocValuesFormatTestCase; +import org.junit.BeforeClass; /** * Tests Lucene42DocValuesFormat @@ -26,6 +27,11 @@ import org.apache.lucene.index.BaseCompr public class TestLucene42DocValuesFormat extends BaseCompressingDocValuesFormatTestCase { private final Codec codec = new Lucene42RWCodec(); + @BeforeClass + public static void beforeClass() { + OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec + } + @Override protected Codec getCodec() { return codec; Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java Wed Jan 29 11:14:53 2014 @@ -41,8 +41,10 @@ import org.apache.lucene.search.PhraseQu import org.apache.lucene.store.AlreadyClosedException; import org.apache.lucene.store.BaseDirectoryWrapper; import org.apache.lucene.store.Directory; +import org.apache.lucene.store.LockObtainFailedException; import org.apache.lucene.store.MockDirectoryWrapper; import org.apache.lucene.store.RAMDirectory; +import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; @@ -1244,4 +1246,27 @@ public class TestAddIndexes extends Luce dest.close(); } + /** Make sure an open IndexWriter on an incoming Directory + * causes a LockObtainFailedException */ + public void testLocksBlock() throws Exception { + Directory src = newDirectory(); + RandomIndexWriter w1 = new RandomIndexWriter(random(), src); + w1.addDocument(new Document()); + w1.commit(); + + Directory dest = newDirectory(); + + IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())); + iwc.setWriteLockTimeout(1); + RandomIndexWriter w2 = new RandomIndexWriter(random(), dest, iwc); + + try { + w2.addIndexes(src); + fail("did not hit expected exception"); + } catch (LockObtainFailedException lofe) { + // expected + } + + IOUtils.close(w1, w2, src, dest); + } } Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java Wed Jan 29 11:14:53 2014 @@ -213,6 +213,7 @@ public class TestBackwardsCompatibility @BeforeClass public static void beforeClass() throws Exception { + assertFalse("test infra is broken!", LuceneTestCase.OLD_FORMAT_IMPERSONATION_IS_ACTIVE); List names = new ArrayList(oldNames.length + oldSingleSegmentNames.length); names.addAll(Arrays.asList(oldNames)); names.addAll(Arrays.asList(oldSingleSegmentNames)); Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java Wed Jan 29 11:14:53 2014 @@ -730,8 +730,10 @@ public class TestIndexWriterReader exten final long endTime = (long) (System.currentTimeMillis() + 1000.*SECONDS); final List excs = Collections.synchronizedList(new ArrayList()); - final Thread[] threads = new Thread[numThreads]; - for(int i=0;i doc1 = c.docCounts.get(++i); assertEquals(includeOptional ? 5 : 4, doc1.size()); assertEquals(1.0F, doc1.get(aQuery), FLOAT_TOLERANCE); assertEquals(1.0F, doc1.get(dQuery), FLOAT_TOLERANCE); - if (includeOptional) + if (includeOptional) { assertEquals(1.0F, doc1.get(cQuery), FLOAT_TOLERANCE); - + } } } } Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestDirectory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestDirectory.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestDirectory.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestDirectory.java Wed Jan 29 11:14:53 2014 @@ -202,12 +202,12 @@ public class TestDirectory extends Lucen } } - lock.release(); + lock.close(); // now lock with different dir lock = dirs[(i+1)%dirs.length].makeLock(lockname); assertTrue(lock.obtain()); - lock.release(); + lock.close(); } for (int i=0; i primaryExtensions) throws IOException { Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLock.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLock.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLock.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLock.java Wed Jan 29 11:14:53 2014 @@ -44,7 +44,7 @@ public class TestLock extends LuceneTest return false; } @Override - public void release() { + public void close() { // do nothing } @Override Modified: lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLockFactory.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLockFactory.java?rev=1562403&r1=1562402&r2=1562403&view=diff ============================================================================== --- lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLockFactory.java (original) +++ lucene/dev/branches/lucene5376/lucene/core/src/test/org/apache/lucene/store/TestLockFactory.java Wed Jan 29 11:14:53 2014 @@ -184,16 +184,16 @@ public class TestLockFactory extends Luc assertTrue("failed to obtain lock", l.obtain()); assertTrue("succeeded in obtaining lock twice", !l2.obtain()); - l.release(); + l.close(); assertTrue("failed to obtain 2nd lock after first one was freed", l2.obtain()); - l2.release(); + l2.close(); // Make sure we can obtain first one again, test isLocked(): assertTrue("failed to obtain lock", l.obtain()); assertTrue(l.isLocked()); assertTrue(l2.isLocked()); - l.release(); + l.close(); assertFalse(l.isLocked()); assertFalse(l2.isLocked()); } @@ -207,7 +207,7 @@ public class TestLockFactory extends Luc Lock l = new NativeFSLockFactory(TEMP_DIR).makeLock("test.lock"); assertTrue("failed to obtain lock", l.obtain()); - l.release(); + l.close(); assertFalse("failed to release lock", l.isLocked()); if (lockFile.exists()) { lockFile.delete(); @@ -225,12 +225,12 @@ public class TestLockFactory extends Luc assertTrue("failed to obtain lock", l.obtain()); try { assertTrue(l2.isLocked()); - l2.release(); + l2.close(); fail("should not have reached here. LockReleaseFailedException should have been thrown"); } catch (LockReleaseFailedException e) { // expected } finally { - l.release(); + l.close(); } } @@ -409,7 +409,7 @@ public class TestLockFactory extends Luc return true; } @Override - public void release() { + public void close() { // do nothing } @Override