From 2ae505b7ec594286feabb25bfc693af3bd394315 Mon Sep 17 00:00:00 2001 From: expani Date: Thu, 19 Dec 2024 15:13:50 -0800 Subject: [PATCH 1/2] Uploaded Index generated from Lucene 8.x ( OpenSearch 1.3.0 ) to be used by UnitTests Signed-off-by: expani --- .../directory/RemoteSnapshotDirectory.java | 2 +- .../opensearch/common/lucene/LuceneTests.java | 6 +++--- .../index/engine/ReadOnlyEngineTests.java | 4 ++-- .../org/opensearch/index/store/StoreTests.java | 4 ++-- .../indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip | Bin 2467 -> 0 bytes .../indices/bwc/{es-6.3.0 => os-1.3.0}/README.md | 11 ++++++----- .../indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip | Bin 0 -> 2899 bytes 7 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 server/src/test/resources/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip rename server/src/test/resources/indices/bwc/{es-6.3.0 => os-1.3.0}/README.md (73%) create mode 100644 server/src/test/resources/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip diff --git a/server/src/main/java/org/opensearch/index/store/remote/directory/RemoteSnapshotDirectory.java b/server/src/main/java/org/opensearch/index/store/remote/directory/RemoteSnapshotDirectory.java index 19ecee67bdb96..b9d772c7e7410 100644 --- a/server/src/main/java/org/opensearch/index/store/remote/directory/RemoteSnapshotDirectory.java +++ b/server/src/main/java/org/opensearch/index/store/remote/directory/RemoteSnapshotDirectory.java @@ -38,7 +38,7 @@ */ public final class RemoteSnapshotDirectory extends Directory { - public static final Version SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY_MINIMUM_VERSION = LegacyESVersion.V_6_0_0; + public static final Version SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY_MINIMUM_VERSION = LegacyESVersion.V_7_2_0; private static final String VIRTUAL_FILE_PREFIX = BlobStoreRepository.VIRTUAL_DATA_BLOB_PREFIX; diff --git a/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java b/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java index c0f675d748aaf..ff011f59dbd43 100644 --- a/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java +++ b/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java @@ -329,11 +329,11 @@ public void testNumDocs() throws IOException { /** * Tests whether old segments are readable and queryable based on the data documented - * in the README here. + * in the README here. */ public void testReadSegmentInfosExtendedCompatibility() throws IOException { - final String pathToTestIndex = "/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip"; - final Version minVersion = LegacyESVersion.V_6_0_0; + final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; + final Version minVersion = LegacyESVersion.V_7_2_0; Path tmp = createTempDir(); TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); try (MockDirectoryWrapper dir = newMockFSDirectory(tmp)) { diff --git a/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java b/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java index 7c9a08d69d3c2..a2647902f3c0d 100644 --- a/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java +++ b/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java @@ -243,7 +243,7 @@ public void testReadOldIndices() throws Exception { IOUtils.close(engine, store); // The index has one document in it, so the checkpoint cannot be NO_OPS_PERFORMED final AtomicLong globalCheckpoint = new AtomicLong(0); - final String pathToTestIndex = "/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip"; + final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; Path tmp = createTempDir(); TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); FeatureFlagSetter.set(FeatureFlags.SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY); @@ -266,7 +266,7 @@ public void testReadOldIndicesFailure() throws IOException { IOUtils.close(engine, store); // The index has one document in it, so the checkpoint cannot be NO_OPS_PERFORMED final AtomicLong globalCheckpoint = new AtomicLong(0); - final String pathToTestIndex = "/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip"; + final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; Path tmp = createTempDir(); TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); try (Store store = createStore(newFSDirectory(tmp))) { diff --git a/server/src/test/java/org/opensearch/index/store/StoreTests.java b/server/src/test/java/org/opensearch/index/store/StoreTests.java index 3777753cb2de8..8b44258c5acd6 100644 --- a/server/src/test/java/org/opensearch/index/store/StoreTests.java +++ b/server/src/test/java/org/opensearch/index/store/StoreTests.java @@ -1284,7 +1284,7 @@ public void testSegmentReplicationDiff() { @SuppressForbidden(reason = "sets the SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY feature flag") public void testReadSegmentsFromOldIndices() throws Exception { int expectedIndexCreatedVersionMajor = SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY_MINIMUM_VERSION.luceneVersion.major; - final String pathToTestIndex = "/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip"; + final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; Path tmp = createTempDir(); TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); final ShardId shardId = new ShardId("index", "_na_", 1); @@ -1309,7 +1309,7 @@ public void testReadSegmentsFromOldIndices() throws Exception { } public void testReadSegmentsFromOldIndicesFailure() throws IOException { - final String pathToTestIndex = "/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip"; + final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; final ShardId shardId = new ShardId("index", "_na_", 1); Path tmp = createTempDir(); TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); diff --git a/server/src/test/resources/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip b/server/src/test/resources/indices/bwc/es-6.3.0/testIndex-es-6.3.0.zip deleted file mode 100644 index db86a76153b25b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 0 }, "mappings": { - "testData": { "properties": { "id": { "type": "keyword" }, "isTestData": { "type": "boolean" }, @@ -35,11 +34,10 @@ curl -X PUT -H 'Content-Type: application/json' 'localhost:9200/testindex?pretty "testDate": { "type": "date" }, "testLocation": { "type": "geo_point"} } - } } }' -curl -X POST "localhost:9200/testindex/testData/?pretty" -H 'Content-Type: application/json' -d' +curl -X POST "localhost:9200/testindex/_doc/1" -H 'Content-Type: application/json' -d' { "id": "testData1", "isTestData": true, @@ -54,4 +52,7 @@ curl -X POST "localhost:9200/testindex/testData/?pretty" -H 'Content-Type: appli "testLocation": "48.553532,-113.022881" } ' + +curl -X POST "localhost:9200/testindex/_flush" -H 'Content-Type: application/json' -d'{}' ``` +Flushing is essential to commit the changes to ensure tests don't fail complaining there are no docs in segment. diff --git a/server/src/test/resources/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip b/server/src/test/resources/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..f751d349dc943185f6d6c101bbecce3edbd286d1 GIT binary patch literal 2899 zcma);c{J4PAIHaxJ+g}#Tx3ZhSA?#zB{G)5FjE;zWh){(A$yjIG2>zwl66Exlw~9u zYhzbbL_@=E<_d8eC4Q5Bzu(C{zxv%jp6_|S=X{^nIp5dwJfF`S1_iN;0ssJRKz|7C z%$szZ-x#d788!fb6Ced}(NMqO;qCzE0f3}RFM56*!C`v%>h3@itPuC~?+=Sfrg-4ouca$QR9hZPwOV)h0(%UJp! zOz=QO8eUl4Lj-az-O{rLz;?N67b+Er7g-tOXf`*!pK)Ije@_mnYwKHTF)02$(pYRCubA;cS@~FuE=Mex zr<7Mr7yd<0*65mHo2=kI;0+nwQcAVw+VW( zHkA?)P)SrQgJ+p3qJRk}wig$kwYd}^CtGfvdnDJR)WMw@-5@XhORjx@DGGuZk1MsA z;{+!hBZ`ME_a6A;v#ja|XQUEp0(Y1VXToiiSd9Ld$yp$#f+yY4?F=*UW~-7nb}zg! zRYopX?T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Wkjy3S#8YA+#~S>#_r>eq}HZC}I4zc+j{MIkYZ$FXDzX*`Qb9q(k4 zB2R$|(G)6nv)Cfp8ugG-T3vr&#uc=1aG?`Eai{m>(=|hN%(@2uS7|Xxz$X?qkV8At zcv+eNJE?1D^6$r2X`un$LGJ24eittPOd1Tz29yE)D7#7g7g`$ob^4zq$MG%6{Vm1) zowYmLe9uy4ZR`$G~dJ#0}VW)_%tOk@)Xt<8 literal 0 HcmV?d00001 From 737ab3a88a360566c6f248a18cdba29079158b6d Mon Sep 17 00:00:00 2001 From: expani Date: Thu, 19 Dec 2024 15:26:21 -0800 Subject: [PATCH 2/2] Moved path to a constant Signed-off-by: expani --- .../java/org/opensearch/common/lucene/LuceneTests.java | 5 +++-- .../org/opensearch/index/engine/ReadOnlyEngineTests.java | 7 +++---- .../test/java/org/opensearch/index/store/StoreTests.java | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java b/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java index ff011f59dbd43..df5e14b0c9e49 100644 --- a/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java +++ b/server/src/test/java/org/opensearch/common/lucene/LuceneTests.java @@ -107,6 +107,8 @@ public class LuceneTests extends OpenSearchTestCase { private static final NamedWriteableRegistry EMPTY_REGISTRY = new NamedWriteableRegistry(Collections.emptyList()); + public static final String OLDER_VERSION_INDEX_ZIP_RELATIVE_PATH = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; + public void testCleanIndex() throws IOException { MockDirectoryWrapper dir = newMockDirectory(); IndexWriterConfig iwc = newIndexWriterConfig(); @@ -332,10 +334,9 @@ public void testNumDocs() throws IOException { * in the README here. */ public void testReadSegmentInfosExtendedCompatibility() throws IOException { - final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; final Version minVersion = LegacyESVersion.V_7_2_0; Path tmp = createTempDir(); - TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); + TestUtil.unzip(getClass().getResourceAsStream(OLDER_VERSION_INDEX_ZIP_RELATIVE_PATH), tmp); try (MockDirectoryWrapper dir = newMockFSDirectory(tmp)) { // The standard API will throw an exception expectThrows(IndexFormatTooOldException.class, () -> Lucene.readSegmentInfos(dir)); diff --git a/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java b/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java index a2647902f3c0d..288822ab1589f 100644 --- a/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java +++ b/server/src/test/java/org/opensearch/index/engine/ReadOnlyEngineTests.java @@ -38,6 +38,7 @@ import org.apache.lucene.tests.util.TestUtil; import org.opensearch.Version; import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.lucene.LuceneTests; import org.opensearch.common.lucene.index.OpenSearchDirectoryReader; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.FeatureFlags; @@ -243,9 +244,8 @@ public void testReadOldIndices() throws Exception { IOUtils.close(engine, store); // The index has one document in it, so the checkpoint cannot be NO_OPS_PERFORMED final AtomicLong globalCheckpoint = new AtomicLong(0); - final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; Path tmp = createTempDir(); - TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); + TestUtil.unzip(getClass().getResourceAsStream(LuceneTests.OLDER_VERSION_INDEX_ZIP_RELATIVE_PATH), tmp); FeatureFlagSetter.set(FeatureFlags.SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY); final IndexSettings indexSettings = IndexSettingsModule.newIndexSettings( "index", @@ -266,9 +266,8 @@ public void testReadOldIndicesFailure() throws IOException { IOUtils.close(engine, store); // The index has one document in it, so the checkpoint cannot be NO_OPS_PERFORMED final AtomicLong globalCheckpoint = new AtomicLong(0); - final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; Path tmp = createTempDir(); - TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); + TestUtil.unzip(getClass().getResourceAsStream(LuceneTests.OLDER_VERSION_INDEX_ZIP_RELATIVE_PATH), tmp); try (Store store = createStore(newFSDirectory(tmp))) { EngineConfig config = config(defaultSettings, store, createTempDir(), newMergePolicy(), null, null, globalCheckpoint::get); try { diff --git a/server/src/test/java/org/opensearch/index/store/StoreTests.java b/server/src/test/java/org/opensearch/index/store/StoreTests.java index 8b44258c5acd6..542f95a4894e2 100644 --- a/server/src/test/java/org/opensearch/index/store/StoreTests.java +++ b/server/src/test/java/org/opensearch/index/store/StoreTests.java @@ -69,6 +69,7 @@ import org.opensearch.common.SuppressForbidden; import org.opensearch.common.UUIDs; import org.opensearch.common.lucene.Lucene; +import org.opensearch.common.lucene.LuceneTests; import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.FeatureFlags; @@ -1284,9 +1285,8 @@ public void testSegmentReplicationDiff() { @SuppressForbidden(reason = "sets the SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY feature flag") public void testReadSegmentsFromOldIndices() throws Exception { int expectedIndexCreatedVersionMajor = SEARCHABLE_SNAPSHOT_EXTENDED_COMPATIBILITY_MINIMUM_VERSION.luceneVersion.major; - final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; Path tmp = createTempDir(); - TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); + TestUtil.unzip(getClass().getResourceAsStream(LuceneTests.OLDER_VERSION_INDEX_ZIP_RELATIVE_PATH), tmp); final ShardId shardId = new ShardId("index", "_na_", 1); Store store = null; @@ -1309,10 +1309,9 @@ public void testReadSegmentsFromOldIndices() throws Exception { } public void testReadSegmentsFromOldIndicesFailure() throws IOException { - final String pathToTestIndex = "/indices/bwc/os-1.3.0/testIndex-os-1.3.0.zip"; final ShardId shardId = new ShardId("index", "_na_", 1); Path tmp = createTempDir(); - TestUtil.unzip(getClass().getResourceAsStream(pathToTestIndex), tmp); + TestUtil.unzip(getClass().getResourceAsStream(LuceneTests.OLDER_VERSION_INDEX_ZIP_RELATIVE_PATH), tmp); IndexSettings indexSettings = IndexSettingsModule.newIndexSettings( "index", Settings.builder()