Skip to content

Conversation

@xuxiong1
Copy link
Contributor

Description

This PR supports starting the ingestion from a user-specified timestamp or offset when creating the new index.

  • added two new ResetState: REWIND_BY_OFFSET and REWIND_BY_TIMESTAMP
  • added new setting ingestion_source.pointer.init.reset.value to IndexMetadata, controls the rewind offset or timestamp in millis
  • added corresponding integration tests

Related Issues

Resolves #17318

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.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing labels Feb 13, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for 7c573c3: 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?

Copy link
Contributor

@Bukhtawar Bukhtawar left a comment

Choose a reason for hiding this comment

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

As I understand the index level settings are controlling the offset resets. I am assuming that we expect this to work in a single shard and single partition setup

@github-actions
Copy link
Contributor

❌ Gradle check result for 4a83c12: 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 54c8bbe: 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 9dd5bd0: 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?

@yupeng9
Copy link
Contributor

yupeng9 commented Feb 21, 2025

Looks good to me

@github-actions
Copy link
Contributor

❌ Gradle check result for 9dd5bd0: 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>
Signed-off-by: xuxiong1 <xiongxug@outlook.com>
Signed-off-by: xuxiong1 <xiongxug@outlook.com>
Signed-off-by: xuxiong1 <xiongxug@outlook.com>
Signed-off-by: xuxiong1 <xiongxug@outlook.com>
Signed-off-by: xuxiong1 <xiongxug@outlook.com>
@github-actions
Copy link
Contributor

❌ Gradle check result for c76a342: 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 c76a342: 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 3d35f46: 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 3d35f46: SUCCESS

@codecov
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 52.05479% with 35 lines in your changes missing coverage. Please review.

Project coverage is 72.46%. Comparing base (8447737) to head (3d35f46).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...pensearch/plugin/kafka/KafkaPartitionConsumer.java 28.00% 14 Missing and 4 partials ⚠️
...org/opensearch/cluster/metadata/IndexMetadata.java 47.36% 5 Missing and 5 partials ⚠️
...g/opensearch/cluster/metadata/IngestionSource.java 69.23% 4 Missing ⚠️
...rch/indices/pollingingest/DefaultStreamPoller.java 57.14% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17354      +/-   ##
============================================
- Coverage     72.48%   72.46%   -0.03%     
- Complexity    65637    65672      +35     
============================================
  Files          5303     5303              
  Lines        304793   304858      +65     
  Branches      44202    44217      +15     
============================================
- Hits         220926   220907      -19     
- Misses        65711    65794      +83     
- Partials      18156    18157       +1     

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

@andrross andrross merged commit 0714a1b into opensearch-project:main Feb 24, 2025
29 of 30 checks passed
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Mar 18, 2025
… timestamp (opensearch-project#17354)

* initial commit

Signed-off-by: xuxiong1 <xiongxug@outlook.com>

* add tests

Signed-off-by: xuxiong1 <xiongxug@outlook.com>

* resolve comments

Signed-off-by: xuxiong1 <xiongxug@outlook.com>

* support optional auto offset config

Signed-off-by: xuxiong1 <xiongxug@outlook.com>

* Update DefaultStreamPollerTests with countDownLatch

Signed-off-by: xuxiong1 <xiongxug@outlook.com>

* use long as timestamp type

Signed-off-by: xuxiong1 <xiongxug@outlook.com>

* add change log

Signed-off-by: xuxiong1 <xiongxug@outlook.com>

---------

Signed-off-by: xuxiong1 <xiongxug@outlook.com>
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Offset management for pull-based ingestion

4 participants