Skip to content

Merge main21 source set into main in simdvec#144921

Merged
ChrisHegarty merged 4 commits intoelastic:mainfrom
ChrisHegarty:merge-main21-into-main
Mar 26, 2026
Merged

Merge main21 source set into main in simdvec#144921
ChrisHegarty merged 4 commits intoelastic:mainfrom
ChrisHegarty:merge-main21-into-main

Conversation

@ChrisHegarty
Copy link
Copy Markdown
Contributor

This is step 2 of #144797. I'm merging the main21 source set into main in the simdvec module, eliminating one level of MR-JAR complexity.

The main21 source set existed because it uses jdk.incubator.vector, which emitted an unsuppressible warning on JDK 21 that was incompatible with -Werror. Now that I've suppressed that warning centrally in #144798, there is no longer a reason to keep these files in a separate source set.

Specifically:

  • I moved all 33 source files from src/main21/java/ into src/main/java/.
  • I replaced the two stub classes in main (VectorScorerFactoryImpl,
    ESVectorizationProvider) with their real main21 implementations. The
    stubs only existed to satisfy the compiler and threw
    UnsupportedOperationException at runtime.
  • I moved IndexInputUtilsTests from src/test21/ into src/test/.
  • I deleted the src/main21/ and src/test21/ directories entirely.
  • I updated build.gradle to pass --add-modules and --add-reads to the
    main compileJava task instead of compileMain21Java.
  • I updated the module-info.java Javadoc to reflect the simplified layout.

I've left the main22 source set and the MR-JAR plugin in place for now;
I'll address those in subsequent steps.

@ChrisHegarty ChrisHegarty added >refactoring :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Mar 25, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@ChrisHegarty ChrisHegarty force-pushed the merge-main21-into-main branch from 8483c07 to 6143727 Compare March 25, 2026 11:43
Copy link
Copy Markdown
Member

@thecoop thecoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP IT

Copy link
Copy Markdown
Contributor

@ldematte ldematte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one!
I suppose we can do that almost everywhere, e.g. in the GPU plugin...
Basically everywhere we have a main21 directory. And if we have just a main21 directory, we can remove mrjar too.

@ChrisHegarty
Copy link
Copy Markdown
Contributor Author

Good one! I suppose we can do that almost everywhere, e.g. in the GPU plugin... Basically everywhere we have a main21 directory. And if we have just a main21 directory, we can remove mrjar too.

@ChrisHegarty
Copy link
Copy Markdown
Contributor Author

ChrisHegarty commented Mar 26, 2026

Good one! I suppose we can do that almost everywhere, e.g. in the GPU plugin... Basically everywhere we have a main21 directory. And if we have just a main21 directory, we can remove mrjar too.

That depends. There are two separate issues at play here: 1) incubating JDK features, and 2) preview Java features. We're currently only addressing the former. The latter will be done separately. In the simdvec case the main21 sourceset was solely for the purpose of constraining the set of source where warnings-as-errors was disabled.

@ChrisHegarty ChrisHegarty reopened this Mar 26, 2026
@ChrisHegarty ChrisHegarty merged commit 6ebc36f into elastic:main Mar 26, 2026
38 of 42 checks passed
@ChrisHegarty ChrisHegarty deleted the merge-main21-into-main branch March 26, 2026 11:16
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 26, 2026
* upstream/main: (146 commits)
  Revert "[Native] Gradle-related tweaks to improve handling of the simdvec native library (elastic#144539)"
  Fix ArrayIndexOutOfBoundsException in fetch phase with partial results (elastic#144385)
  ESQL: Correctly manage NULL data type for SUM (elastic#144942)
  [ESQL] Fixes GroupedTopNBenchmark not executing (elastic#144944)
  Fix reader context leak when query response serialization fails (elastic#144708)
  Validate individual offset values in BULK_OFFSETS bounds checks (elastic#144643)
  Merge main21 source set into main in simdvec (elastic#144921)
  [TEST] Unmute TsidExtractingIdFieldMapperTests (elastic#144848)
  [Native] Gradle-related tweaks to improve handling of the simdvec native library (elastic#144539)
  Fix `ThreadedActionListenerTests#testRejectionHandling` (elastic#144795)
  Add new DLM Frozen Tier Transition execution plugin and service (elastic#144595)
  Prometheus: execute query_range via parsed EsqlStatement plan (elastic#144416)
  Investigate `testBulkIndexingRequestSplitting` failure (elastic#144766)
  Add test utility for wrapping directories in FilterDirectory layer (elastic#143563)
  Fix ES|QL decay tests with negative scale (elastic#144657)
  Fix circuit breaker leak in percolator query construction (elastic#144827)
  Use XPerFieldDocValuesFormat in AbstractTSDBSyntheticIdCodec (elastic#144744)
  [DOCS] Document how reindex work in CPS (elastic#144016)
  Fix Int4 vector library tests failing on Java 21 (elastic#144830)
  [DiskBBQ] Fix index sorting on flush (elastic#144938)
  ...
seanzatzdev pushed a commit to seanzatzdev/elasticsearch that referenced this pull request Mar 26, 2026
This is step 2 of elastic#144797. I'm merging the `main21` source set into `main` in the simdvec module, eliminating one level of MR-JAR complexity.

The `main21` source set existed because it uses `jdk.incubator.vector`, which emitted an unsuppressible warning on JDK 21 that was incompatible with `-Werror`. Now that I've suppressed that warning centrally in elastic#144798, there is no longer a reason to keep these files in a separate source set.

Specifically:
  - I moved all 33 source files from `src/main21/java/` into `src/main/java/`.
  - I replaced the two stub classes in `main` (`VectorScorerFactoryImpl`,
    `ESVectorizationProvider`) with their real `main21` implementations. The
    stubs only existed to satisfy the compiler and threw
    `UnsupportedOperationException` at runtime.
  - I moved `IndexInputUtilsTests` from `src/test21/` into `src/test/`.
  - I deleted the `src/main21/` and `src/test21/` directories entirely.
  - I updated `build.gradle` to pass `--add-modules` and `--add-reads` to the
    main `compileJava` task instead of `compileMain21Java`.
  - I updated the `module-info.java` Javadoc to reflect the simplified layout.
  
  I've left the `main22` source set and the MR-JAR plugin in place for now;
  I'll address those in subsequent steps.
seanzatzdev pushed a commit to seanzatzdev/elasticsearch that referenced this pull request Mar 27, 2026
This is step 2 of elastic#144797. I'm merging the `main21` source set into `main` in the simdvec module, eliminating one level of MR-JAR complexity.

The `main21` source set existed because it uses `jdk.incubator.vector`, which emitted an unsuppressible warning on JDK 21 that was incompatible with `-Werror`. Now that I've suppressed that warning centrally in elastic#144798, there is no longer a reason to keep these files in a separate source set.

Specifically:
  - I moved all 33 source files from `src/main21/java/` into `src/main/java/`.
  - I replaced the two stub classes in `main` (`VectorScorerFactoryImpl`,
    `ESVectorizationProvider`) with their real `main21` implementations. The
    stubs only existed to satisfy the compiler and threw
    `UnsupportedOperationException` at runtime.
  - I moved `IndexInputUtilsTests` from `src/test21/` into `src/test/`.
  - I deleted the `src/main21/` and `src/test21/` directories entirely.
  - I updated `build.gradle` to pass `--add-modules` and `--add-reads` to the
    main `compileJava` task instead of `compileMain21Java`.
  - I updated the `module-info.java` Javadoc to reflect the simplified layout.
  
  I've left the `main22` source set and the MR-JAR plugin in place for now;
  I'll address those in subsequent steps.
mamazzol pushed a commit to mamazzol/elasticsearch that referenced this pull request Mar 30, 2026
This is step 2 of elastic#144797. I'm merging the `main21` source set into `main` in the simdvec module, eliminating one level of MR-JAR complexity.

The `main21` source set existed because it uses `jdk.incubator.vector`, which emitted an unsuppressible warning on JDK 21 that was incompatible with `-Werror`. Now that I've suppressed that warning centrally in elastic#144798, there is no longer a reason to keep these files in a separate source set.

Specifically:
  - I moved all 33 source files from `src/main21/java/` into `src/main/java/`.
  - I replaced the two stub classes in `main` (`VectorScorerFactoryImpl`,
    `ESVectorizationProvider`) with their real `main21` implementations. The
    stubs only existed to satisfy the compiler and threw
    `UnsupportedOperationException` at runtime.
  - I moved `IndexInputUtilsTests` from `src/test21/` into `src/test/`.
  - I deleted the `src/main21/` and `src/test21/` directories entirely.
  - I updated `build.gradle` to pass `--add-modules` and `--add-reads` to the
    main `compileJava` task instead of `compileMain21Java`.
  - I updated the `module-info.java` Javadoc to reflect the simplified layout.
  
  I've left the `main22` source set and the MR-JAR plugin in place for now;
  I'll address those in subsequent steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>refactoring :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants