Skip to content

register translog read forward config#20280

Merged
msfroh merged 1 commit intoopensearch-project:mainfrom
xuxiong1:register-settings
Dec 19, 2025
Merged

register translog read forward config#20280
msfroh merged 1 commit intoopensearch-project:mainfrom
xuxiong1:register-settings

Conversation

@xuxiong1
Copy link
Contributor

@xuxiong1 xuxiong1 commented Dec 17, 2025

Description

Registering the INDEX_TRANSLOG_READ_FORWARD_SETTING to the IndexScopedSettings, which fixed the unknow settings error:

{
  "error": {
    "root_cause": [
      {
        "type": "settings_exception",
        "reason": "unknown setting [index.translog.read_forward] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
      }
    ],
    "type": "settings_exception",
    "reason": "unknown setting [index.translog.read_forward] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status": 400
}

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

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.

Summary by CodeRabbit

  • New Features
    • The translog "read forward" index setting is now included as a built-in configuration option, simplifying enabling and management of read-forward behavior and improving consistency of index configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@xuxiong1 xuxiong1 requested a review from a team as a code owner December 17, 2025 19:56
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Walkthrough

Added IndexSettings.INDEX_TRANSLOG_READ_FORWARD_SETTING to the BUILT_IN_INDEX_SETTINGS set in IndexScopedSettings, expanding the list of built-in index-scoped settings recognized by the system.

Changes

Cohort / File(s) Summary
Index Settings Registration
server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java
Included IndexSettings.INDEX_TRANSLOG_READ_FORWARD_SETTING in the BUILT_IN_INDEX_SETTINGS initialization.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single addition to a static collection; minimal risk.
  • Files to spot-check: IndexScopedSettings.java and any callers that enumerate built-in settings.

Possibly related PRs

Suggested labels

enhancement, Indexing:Replication

Suggested reviewers

  • kotwanikunal
  • dbwiddis
  • cwperks
  • mch2
  • reta
  • sachinpkale
  • shwetathareja
  • msfroh
  • anasalkouz
  • gbbafna

Poem

🐰 I nibbled the code, a tiny small thing,
A translog flag now tucked in the ring.
Quietly joined in the built-in array,
Hopping along — ready for play! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description explains the change, includes the error that was fixed, but lacks a concrete issue reference and has unchecked checklist items indicating incomplete prerequisites. Fill in the related issue number that this PR resolves and verify that testing, API specification updates, and documentation have been addressed before merging.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: registering the translog read forward configuration setting in IndexScopedSettings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 63f979b and f891a1b.

📒 Files selected for processing (1)
  • server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: gradle-check
  • GitHub Check: precommit (21, windows-2025, true)
  • GitHub Check: precommit (21, ubuntu-24.04-arm)
  • GitHub Check: precommit (21, ubuntu-latest)
  • GitHub Check: precommit (25, ubuntu-24.04-arm)
  • GitHub Check: precommit (25, macos-15)
  • GitHub Check: precommit (25, macos-15-intel)
  • GitHub Check: precommit (21, windows-latest)
  • GitHub Check: precommit (25, ubuntu-latest)
  • GitHub Check: precommit (25, windows-latest)
  • GitHub Check: precommit (21, macos-15-intel)
  • GitHub Check: precommit (21, macos-15)
  • GitHub Check: assemble (21, ubuntu-24.04-arm)
  • GitHub Check: assemble (25, windows-latest)
  • GitHub Check: assemble (21, windows-latest)
  • GitHub Check: assemble (25, ubuntu-latest)
  • GitHub Check: assemble (21, ubuntu-latest)
  • GitHub Check: assemble (25, ubuntu-24.04-arm)
  • GitHub Check: Analyze (java)
🔇 Additional comments (1)
server/src/main/java/org/opensearch/common/settings/IndexScopedSettings.java (1)

148-148: LGTM! Addition correctly registers the translog read_forward setting.

The addition of INDEX_TRANSLOG_READ_FORWARD_SETTING to BUILT_IN_INDEX_SETTINGS correctly addresses the PR objective to resolve the "unknown setting" error for "index.translog.read_forward". The placement near other translog settings is logical and syntactically correct.

Ensure that INDEX_TRANSLOG_READ_FORWARD_SETTING is properly defined in the IndexSettings class with the Property.IndexScope flag to prevent compilation or runtime issues.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

❌ Gradle check result for d13ca8a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 63f979b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: xuxiong1 <xiongxug@outlook.com>
@github-actions
Copy link
Contributor

❌ Gradle check result for f891a1b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@xuxiong1 xuxiong1 closed this Dec 18, 2025
@xuxiong1 xuxiong1 reopened this Dec 18, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for f891a1b: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@xuxiong1 xuxiong1 closed this Dec 18, 2025
@xuxiong1 xuxiong1 reopened this Dec 18, 2025
@github-actions
Copy link
Contributor

❕ Gradle check result for f891a1b: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.23%. Comparing base (930ae74) to head (f891a1b).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20280      +/-   ##
============================================
+ Coverage     73.20%   73.23%   +0.02%     
- Complexity    71745    71779      +34     
============================================
  Files          5795     5795              
  Lines        328304   328298       -6     
  Branches      47283    47279       -4     
============================================
+ Hits         240334   240415      +81     
+ Misses        68663    68595      -68     
+ Partials      19307    19288      -19     

☔ 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.

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.

2 participants

Comments