Skip to content

Commit

Permalink
Formatting sizeOfSegmentFiles for time calculation.
Browse files Browse the repository at this point in the history
Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
  • Loading branch information
Rishikesh1159 committed Sep 6, 2022
1 parent 8138702 commit 3fb0e25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix NoSuchFileExceptions with segment replication when computing primary metadata snapshots ([#4366](https://github.com/opensearch-project/OpenSearch/pull/4366))
- [Segment Replication] Update flaky testOnNewCheckpointFromNewPrimaryCancelOngoingReplication unit test ([#4414](https://github.com/opensearch-project/OpenSearch/pull/4414))
- Fixed the `_cat/shards/10_basic.yml` test cases fix.
- Fix timeout issue by calculating time needed to process getSegmentFiles
- [Segment Replication] Fix timeout issue by calculating time needed to process getSegmentFiles ([#4426](https://github.com/opensearch-project/OpenSearch/pull/4426))

### Security
- CVE-2022-25857 org.yaml:snakeyaml DOS vulnerability ([#4341](https://github.com/opensearch-project/OpenSearch/pull/4341))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public void getSegmentFiles(
sizeOfSegmentFiles += filesToFetch.get(i).length();
}
// Making sure files size is in correct format to perform time calculation.
sizeOfSegmentFiles = Math.abs(sizeOfSegmentFiles);
if(sizeOfSegmentFiles<0){
sizeOfSegmentFiles *=-1;
}
// Maximum size of files to fetch (segment files), that can be processed in 1 minute for a m5.xlarge machine.
long baseSegmentFilesSize = 300000000;

Expand Down

0 comments on commit 3fb0e25

Please sign in to comment.