Skip to content

Commit 89248c7

Browse files
varunbharadwajanandpatel9998
authored andcommitted
Fix file-based ingestion if the start point is beyond the lines in the file (opensearch-project#19757)
Signed-off-by: Varun Bharadwaj <varunbharadwaj1995@gmail.com>
1 parent 7de1750 commit 89248c7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3737
- Fix issue with updating core with a patch number other than 0 ([#19377](https://github.com/opensearch-project/OpenSearch/pull/19377))
3838
- [Java Agent] Allow JRT protocol URLs in protection domain extraction ([#19683](https://github.com/opensearch-project/OpenSearch/pull/19683))
3939
- Fix potential concurrent modification exception when updating allocation filters ([#19701])(https://github.com/opensearch-project/OpenSearch/pull/19701))
40+
- Fix file-based ingestion consumer to handle start point beyond max line number([#19757])(https://github.com/opensearch-project/OpenSearch/pull/19757))
4041

4142
### Dependencies
4243
- Update to Gradle 9.1 ([#19575](https://github.com/opensearch-project/OpenSearch/pull/19575))

plugins/ingestion-fs/src/main/java/org/opensearch/plugin/ingestion/fs/FilePartitionConsumer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ private synchronized List<ReadResult<FileOffset, FileMessage>> readFromFile(long
9090
}
9191

9292
while (currentLineInReader < startLine && reader.readLine() != null) {
93+
lastReadLine = currentLineInReader;
9394
currentLineInReader++;
9495
}
9596

0 commit comments

Comments
 (0)