Skip to content

Plumb DLM error store through to DlmFrozenTransition classes#145243

Merged
dakrone merged 3 commits intoelastic:mainfrom
dakrone:dlm-plumb-error-store
Mar 31, 2026
Merged

Plumb DLM error store through to DlmFrozenTransition classes#145243
dakrone merged 3 commits intoelastic:mainfrom
dakrone:dlm-plumb-error-store

Conversation

@dakrone
Copy link
Copy Markdown
Member

@dakrone dakrone commented Mar 30, 2026

This moves the DLM error store to be part of the PluginServices, which allows us to share the same instance between the core and x-pack versions of the DLM code. It is used within the DlmFrozenTransitionExecutor to handle uncaught exceptions currently.

Subsequent work will add this to the actual conversion task, so that errors can be recorded from the task itself.

This moves the DLM error store to be part of the `PluginServices`, which allows us to share the same instance between the core and x-pack versions of the DLM code. It is used within the `DlmFrozenTransitionExecutor` to handle uncaught exceptions currently.

Subsequent work will add this to the actual conversion task, so that errors can be recorded from the task itself.
@dakrone dakrone marked this pull request as ready for review March 31, 2026 01:39
@dakrone dakrone requested a review from a team as a code owner March 31, 2026 01:39
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@lukewhiting
Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: f8a72c61-2199-4af4-af1b-d538dd1bb6fc

📥 Commits

Reviewing files that changed from the base of the PR and between d0db5d3 and 15d847d.

📒 Files selected for processing (23)
  • modules/data-streams/src/main/java/org/elasticsearch/datastreams/DataStreamsPlugin.java
  • modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleService.java
  • modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/ErrorRecordingActionListener.java
  • modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/action/TransportExplainDataStreamLifecycleAction.java
  • modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/health/DataStreamLifecycleHealthInfoPublisher.java
  • modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStoreTests.java
  • modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java
  • modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/action/TransportGetDataStreamLifecycleStatsActionTests.java
  • modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/health/DataStreamLifecycleHealthInfoPublisherTests.java
  • server/src/main/java/module-info.java
  • server/src/main/java/org/elasticsearch/dlm/DataStreamLifecycleErrorStore.java
  • server/src/main/java/org/elasticsearch/node/NodeConstruction.java
  • server/src/main/java/org/elasticsearch/node/PluginServiceInstances.java
  • server/src/main/java/org/elasticsearch/plugins/Plugin.java
  • x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DataStreamLifecycleConvertToFrozen.java
  • x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionExecutor.java
  • x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionPlugin.java
  • x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionRunnable.java
  • x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionService.java
  • x-pack/plugin/dlm-frozen-transition/src/test/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionExecutorTests.java
  • x-pack/plugin/dlm-frozen-transition/src/test/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionServiceTests.java
  • x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleDownsamplingSecurityIT.java
  • x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java

📝 Walkthrough

Walkthrough

The DataStreamLifecycleErrorStore class was relocated from the org.elasticsearch.datastreams.lifecycle package to org.elasticsearch.dlm package in the server module. Initialization was centralized in NodeConstruction and exposed through PluginServiceInstances and a new dlmErrorStore() method in the PluginServices interface. Components that previously created the error store locally (DataStreamsPlugin) now receive it via dependency injection. Import statements were updated across the data-streams, dlm-frozen-transition, and security test modules. The DlmFrozenTransitionRunnable interface was extended with a getProjectId() method, and related services now accept and utilize the error store dependency. The org.elasticsearch.dlm package is now exported by the server module.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

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

Copy link
Copy Markdown
Contributor

@lukewhiting lukewhiting left a comment

Choose a reason for hiding this comment

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

A couple of very minor comments but nothing to block over :-) Thanks for taking this on!

Comment on lines 12 to 13
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.Message;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should these use the ES wrapper's instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It would be nice if they did, but apparently the error store uses bits of the logger that our log manager does not support, so for now they have to remain using the log4j one.

indexName,
ex,
Strings.format("Error executing transition for index [%s]", indexName),
1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want all errors logged at WARN or can we go with the same value as DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING and stick to every 10th?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was matching the behavior for now, I think we need to know whether we want this to be the one-stop-shop for error handling (in which case, we'll need to move that setting into core and add code to make it dynamic here) or whether we want to do more error handling in the converter. Let's discuss it.

@dakrone dakrone enabled auto-merge (squash) March 31, 2026 15:19
@dakrone dakrone merged commit 03a3120 into elastic:main Mar 31, 2026
35 checks passed
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 31, 2026
…rics

* upstream/main: (21 commits)
  Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:external-basic.topSnippetsFunction} elastic#145353
  Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:external-basic.scoreFunction} elastic#145352
  [DiskBBQ] Fix bug in NeighborQueue#popRawAndAddRaw (elastic#145324)
  Fix dense_vector default index options when using BFLOAT16 (elastic#145202)
  Use checked exceptions in entitlement constructor rules (elastic#145234)
  ESQL: DS: datasource file plugins should not return TEXT types (elastic#145334)
  Plumb DLM error store through to DlmFrozenTransition classes (elastic#145243)
  Make Settings.Builder.remove() fluent (elastic#145294)
  Add FLS tests for METRICS_INFO and TS_INFO (elastic#145211)
  Fix flaky SecurityFeatureResetTests (elastic#145063)
  [DOCS] Fix conflict markers in ESQL processing command list (elastic#145338)
  Skip certain metric assertions on Windows (elastic#144933)
  [ES|QL] Add schema reconciliation for multi-file external sources (elastic#145220)
  Simplify DiskBBQ dynamic visit ratio to linear (elastic#142784)
  ESQL: Disallow unmapped_fields=load with partial non-KEYWORD (elastic#144109)
  [Transform] Track Linked Projects (elastic#144399)
  Fix bulk scoring to process last batch instead of falling through to scalar tail (elastic#145316)
  Clean up TickerScheduleEngineTests (elastic#145303)
  [CI] ShardBulkInferenceActionFilterIT testRestart - Ensuring that secrets-inference index is available after full restart and unmuting test (elastic#145317)
  Add CRUD doc to the DistributedArchitectureGuide (elastic#144710)
  ...
seanzatzdev pushed a commit to seanzatzdev/elasticsearch that referenced this pull request Mar 31, 2026
…#145243)

* Plumb DLM error store through to DlmFrozenTransition classes

This moves the DLM error store to be part of the `PluginServices`, which allows us to share the same instance between the core and x-pack versions of the DLM code. It is used within the `DlmFrozenTransitionExecutor` to handle uncaught exceptions currently.

Subsequent work will add this to the actual conversion task, so that errors can be recorded from the task itself.
# Conflicts:
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMConvertToFrozen.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionExecutor.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionPlugin.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionService.java
#	x-pack/plugin/dlm-frozen-transition/src/test/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionExecutorTests.java
seanzatzdev pushed a commit to seanzatzdev/elasticsearch that referenced this pull request Mar 31, 2026
…#145243)

* Plumb DLM error store through to DlmFrozenTransition classes

This moves the DLM error store to be part of the `PluginServices`, which allows us to share the same instance between the core and x-pack versions of the DLM code. It is used within the `DlmFrozenTransitionExecutor` to handle uncaught exceptions currently.

Subsequent work will add this to the actual conversion task, so that errors can be recorded from the task itself.
# Conflicts:
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMConvertToFrozen.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionExecutor.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionPlugin.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionService.java
#	x-pack/plugin/dlm-frozen-transition/src/test/java/org/elasticsearch/xpack/dlm/frozen/DLMFrozenTransitionExecutorTests.java

# Conflicts:
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DataStreamLifecycleConvertToFrozen.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionExecutor.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionPlugin.java
#	x-pack/plugin/dlm-frozen-transition/src/main/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionService.java
#	x-pack/plugin/dlm-frozen-transition/src/test/java/org/elasticsearch/xpack/dlm/frozen/DlmFrozenTransitionExecutorTests.java
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 31, 2026
This moves the `DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING` setting into the core module so
that it can be used by both the regular DLM service and the frozen conversion bits to set up the
retry interval in the DLM error store.

Relates to elastic#145243
ncordon pushed a commit to ncordon/elasticsearch that referenced this pull request Apr 1, 2026
…#145243)

* Plumb DLM error store through to DlmFrozenTransition classes

This moves the DLM error store to be part of the `PluginServices`, which allows us to share the same instance between the core and x-pack versions of the DLM code. It is used within the `DlmFrozenTransitionExecutor` to handle uncaught exceptions currently.

Subsequent work will add this to the actual conversion task, so that errors can be recorded from the task itself.
dakrone added a commit that referenced this pull request Apr 1, 2026
* Move DLM signalling error retry setting into core

This moves the `DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING` setting into the core module so
that it can be used by both the regular DLM service and the frozen conversion bits to set up the
retry interval in the DLM error store.

Relates to #145243
mromaios pushed a commit to mromaios/elasticsearch that referenced this pull request Apr 9, 2026
…#145243)

* Plumb DLM error store through to DlmFrozenTransition classes

This moves the DLM error store to be part of the `PluginServices`, which allows us to share the same instance between the core and x-pack versions of the DLM code. It is used within the `DlmFrozenTransitionExecutor` to handle uncaught exceptions currently.

Subsequent work will add this to the actual conversion task, so that errors can be recorded from the task itself.
mromaios pushed a commit to mromaios/elasticsearch that referenced this pull request Apr 9, 2026
* Move DLM signalling error retry setting into core

This moves the `DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING` setting into the core module so
that it can be used by both the regular DLM service and the frozen conversion bits to set up the
retry interval in the DLM error store.

Relates to elastic#145243
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