Skip to content

Commit f773503

Browse files
Fix file-based ingestion if the start point is beyond the lines in the file (#19757)
Signed-off-by: Varun Bharadwaj <varunbharadwaj1995@gmail.com>
1 parent a250c35 commit f773503

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
@@ -36,6 +36,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3636
- Fix issue with updating core with a patch number other than 0 ([#19377](https://github.com/opensearch-project/OpenSearch/pull/19377))
3737
- [Java Agent] Allow JRT protocol URLs in protection domain extraction ([#19683](https://github.com/opensearch-project/OpenSearch/pull/19683))
3838
- Fix potential concurrent modification exception when updating allocation filters ([#19701])(https://github.com/opensearch-project/OpenSearch/pull/19701))
39+
- Fix file-based ingestion consumer to handle start point beyond max line number([#19757])(https://github.com/opensearch-project/OpenSearch/pull/19757))
3940

4041
### Dependencies
4142
- 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)