Skip to content

Conversation

@mgodwan
Copy link
Member

@mgodwan mgodwan commented Aug 20, 2025

Description

When enabling scaled_float field, due to different ClassLoader being used for module, and core, ScaledFloatFieldMapper is unable to access package-protected methods. This is leading to process being killed due to the fatal error. This commit fixes the same.

java.lang.IllegalAccessError: class org.opensearch.index.mapper.ScaledFloatFieldMapper tried to access method 'void org.opensearch.index.mapper.FieldMapper.checkStoredAndDocValuesForDerivedSource()' (org.opensearch.index.mapper.ScaledFloatFieldMapper is in unnamed module of loader java.net.FactoryURLClassLoader @16b57f2; org.opensearch.index.mapper.FieldMapper is in unnamed module of loader 'app')

Related Issues

NA

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
@mgodwan
Copy link
Member Author

mgodwan commented Aug 20, 2025

Note: The issue only impacts when derived source is enabled on an index with scaled_float mapping type.

@github-actions
Copy link
Contributor

✅ Gradle check result for 0ecc15f: SUCCESS

@codecov
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.81%. Comparing base (c442cce) to head (0ecc15f).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19113      +/-   ##
============================================
- Coverage     72.98%   72.81%   -0.18%     
+ Complexity    69475    69388      -87     
============================================
  Files          5647     5647              
  Lines        319210   319210              
  Branches      46171    46171              
============================================
- Hits         232977   232420     -557     
- Misses        67385    67986     +601     
+ Partials      18848    18804      -44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bharath-techie bharath-techie merged commit 9e64838 into opensearch-project:main Aug 22, 2025
74 of 85 checks passed
atris pushed a commit to atris/OpenSearch that referenced this pull request Aug 28, 2025
…opensearch-project#19113)

* Fix access specifier for FieldMapper method to allow usage by plugins

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

* Apply spotless

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

---------

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
pranikum pushed a commit to pranikum/OpenSearch that referenced this pull request Sep 4, 2025
…opensearch-project#19113)

* Fix access specifier for FieldMapper method to allow usage by plugins

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

* Apply spotless

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

---------

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
kh3ra pushed a commit to kh3ra/OpenSearch that referenced this pull request Sep 5, 2025
…opensearch-project#19113)

* Fix access specifier for FieldMapper method to allow usage by plugins

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

* Apply spotless

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

---------

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Sep 26, 2025
…opensearch-project#19113)

* Fix access specifier for FieldMapper method to allow usage by plugins

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

* Apply spotless

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>

---------

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants