Skip to content

Commit 9b42790

Browse files
authored
Merge branch 'main' into issue/19639-grpc-error-handling-setting
Signed-off-by: Sergei Ustimenko <fdesu@proton.me>
2 parents 6392849 + c9a5fab commit 9b42790

File tree

90 files changed

+4922
-511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+4922
-511
lines changed

.github/benchmark-configs.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"SINGLE_NODE_CLUSTER": "true",
4242
"MIN_DISTRIBUTION": "true",
4343
"TEST_WORKLOAD": "big5",
44-
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.0\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
44+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.1\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
4545
"CAPTURE_NODE_STAT": "true",
4646
"TEST_PROCEDURE": "restore-from-snapshot"
4747
},
@@ -91,7 +91,7 @@
9191
"MIN_DISTRIBUTION": "true",
9292
"TEST_WORKLOAD": "big5",
9393
"ADDITIONAL_CONFIG": "search.concurrent_segment_search.enabled:true",
94-
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.0\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
94+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.1\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
9595
"CAPTURE_NODE_STAT": "true",
9696
"TEST_PROCEDURE": "restore-from-snapshot"
9797
},
@@ -109,7 +109,7 @@
109109
"MIN_DISTRIBUTION": "true",
110110
"TEST_WORKLOAD": "big5",
111111
"ADDITIONAL_CONFIG": "search.concurrent_segment_search.mode:all",
112-
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.0\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
112+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.1\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
113113
"CAPTURE_NODE_STAT": "true",
114114
"TEST_PROCEDURE": "restore-from-snapshot"
115115
},
@@ -127,7 +127,7 @@
127127
"MIN_DISTRIBUTION": "true",
128128
"TEST_WORKLOAD": "big5",
129129
"ADDITIONAL_CONFIG": "search.concurrent_segment_search.mode:auto",
130-
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.0\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
130+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.1\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
131131
"CAPTURE_NODE_STAT": "true",
132132
"TEST_PROCEDURE": "restore-from-snapshot"
133133
},
@@ -145,7 +145,7 @@
145145
"MIN_DISTRIBUTION": "true",
146146
"TEST_WORKLOAD": "big5",
147147
"ADDITIONAL_CONFIG": "opensearch.experimental.feature.approximate_point_range_query.enabled:true",
148-
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.0\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
148+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.1\",\"snapshot_name\":\"big5_1_shard_single_client\"}",
149149
"CAPTURE_NODE_STAT": "true",
150150
"TEST_PROCEDURE": "restore-from-snapshot"
151151
},
@@ -178,7 +178,7 @@
178178
"SINGLE_NODE_CLUSTER": "true",
179179
"MIN_DISTRIBUTION": "true",
180180
"TEST_WORKLOAD": "http_logs",
181-
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.0\",\"snapshot_name\":\"http_logs_1_shard\"}",
181+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.1\",\"snapshot_name\":\"http_logs_1_shard\"}",
182182
"CAPTURE_NODE_STAT": "true",
183183
"TEST_PROCEDURE": "restore-from-snapshot"
184184
},
@@ -195,7 +195,7 @@
195195
"SINGLE_NODE_CLUSTER": "true",
196196
"MIN_DISTRIBUTION": "true",
197197
"TEST_WORKLOAD": "nyc_taxis",
198-
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.0\",\"snapshot_name\":\"nyc_taxis_1_shard\"}",
198+
"WORKLOAD_PARAMS": "{\"snapshot_repo_name\":\"benchmark-workloads-repo-3x\",\"snapshot_bucket_name\":\"benchmark-workload-snapshots\",\"snapshot_region\":\"us-east-1\",\"snapshot_base_path\":\"10.3.1\",\"snapshot_name\":\"nyc_taxis_1_shard\"}",
199199
"CAPTURE_NODE_STAT": "true",
200200
"TEST_PROCEDURE": "restore-from-snapshot"
201201
},

.github/workflows/publish-maven-snapshots.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@ jobs:
3232
export-env: true
3333
env:
3434
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
35-
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
36-
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
35+
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
36+
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
37+
38+
- name: Configure AWS credentials
39+
uses: aws-actions/configure-aws-credentials@v5
40+
with:
41+
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
42+
aws-region: us-east-1
3743

3844
- name: Publish snapshots to maven
3945
run: |

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55

66
## [Unreleased 3.x]
77
### Added
8+
9+
- Add support for a ForkJoinPool type ([#19008](https://github.com/opensearch-project/OpenSearch/pull/19008))
10+
- Add seperate shard limit validation for local and remote indices ([#19532](https://github.com/opensearch-project/OpenSearch/pull/19532))
811
- Use Lucene `pack` method for `half_float` and `usigned_long` when using `ApproximatePointRangeQuery`.
912
- Add a mapper for context aware segments grouping criteria ([#19233](https://github.com/opensearch-project/OpenSearch/pull/19233))
1013
- Return full error for GRPC error response ([#19568](https://github.com/opensearch-project/OpenSearch/pull/19568))
1114
- Add pluggable gRPC interceptors with explicit ordering([#19005](https://github.com/opensearch-project/OpenSearch/pull/19005))
1215
- Add metrics for the merged segment warmer feature ([#18929](https://github.com/opensearch-project/OpenSearch/pull/18929))
1316
- Add separate grpc.detailed_errors.enabled error handling setting for gRPC ([#19644](https://github.com/opensearch-project/OpenSearch/pull/19644))
17+
- Add pointer based lag metric in pull-based ingestion ([#19635](https://github.com/opensearch-project/OpenSearch/pull/19635))
1418

1519
### Changed
1620
- Faster `terms` query creation for `keyword` field with index and docValues enabled ([#19350](https://github.com/opensearch-project/OpenSearch/pull/19350))
1721
- Refactor to move prepareIndex and prepareDelete methods to Engine class ([#19551](https://github.com/opensearch-project/OpenSearch/pull/19551))
1822
- Omit maxScoreCollector in SimpleTopDocsCollectorContext when concurrent segment search enabled ([#19584](https://github.com/opensearch-project/OpenSearch/pull/19584))
23+
- Onboarding new maven snapshots publishing to s3 ([#19619](https://github.com/opensearch-project/OpenSearch/pull/19619))
1924
- Remove MultiCollectorWrapper and use MultiCollector in Lucene instead ([#19595](https://github.com/opensearch-project/OpenSearch/pull/19595))
25+
- Change implementation for `percentiles` aggregation for latency improvement ([#19648](https://github.com/opensearch-project/OpenSearch/pull/19648))
2026

2127
### Fixed
2228
- Fix Allocation and Rebalance Constraints of WeightFunction are incorrectly reset ([#19012](https://github.com/opensearch-project/OpenSearch/pull/19012))
2329
- Fix flaky test FieldDataLoadingIT.testIndicesFieldDataCacheSizeSetting ([#19571](https://github.com/opensearch-project/OpenSearch/pull/19571))
2430
- Avoid primary shard failure caused by merged segment warmer exceptions ([#19436](https://github.com/opensearch-project/OpenSearch/pull/19436))
2531
- Fix pull-based ingestion out-of-bounds offset scenarios and remove persisted offsets ([#19607](https://github.com/opensearch-project/OpenSearch/pull/19607))
32+
- [Star Tree] Fix sub-aggregator casting for search with profile=true ([19652](https://github.com/opensearch-project/OpenSearch/pull/19652))
33+
- Fix issue with updating core with a patch number other than 0 ([#19377](https://github.com/opensearch-project/OpenSearch/pull/19377))
2634

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

MAINTAINERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
3434
| Rishabh Maurya | [rishabhmaurya](https://github.com/rishabhmaurya) | Amazon |
3535
| Rishikesh Pasham | [Rishikesh1159](https://github.com/Rishikesh1159) | Amazon |
3636
| Sachin Kale | [sachinpkale](https://github.com/sachinpkale) | Amazon |
37+
| Sandesh Kumar | [sandeshkr419](https://github.com/sandeshkr419) | Amazon |
3738
| Sarat Vemulapalli | [saratvemulapalli](https://github.com/saratvemulapalli) | Amazon |
3839
| Shweta Thareja | [shwetathareja](https://github.com/shwetathareja) | Amazon |
3940
| Sorabh Hamirwasia | [sohami](https://github.com/sohami) | Amazon |

build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,11 @@ subprojects {
119119
}
120120
maven {
121121
name = 'Snapshots'
122-
url = 'https://central.sonatype.com/repository/maven-snapshots/'
123-
credentials {
124-
username = System.getenv("SONATYPE_USERNAME")
125-
password = System.getenv("SONATYPE_PASSWORD")
122+
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
123+
credentials(AwsCredentials) {
124+
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
125+
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
126+
sessionToken = System.getenv("AWS_SESSION_TOKEN")
126127
}
127128
}
128129
}

buildSrc/src/main/java/org/opensearch/gradle/info/GlobalBuildInfoPlugin.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,8 @@ private static BwcVersions resolveBwcVersions(File root) {
149149
// todo redesign this terrible unreliable hack; should NEVER rely on parsing a source file
150150
// for now, we hack the hack
151151
File versionsFile = new File(root, DEFAULT_VERSION_JAVA_FILE_PATH);
152-
File legacyVersionsFile = new File(root, DEFAULT_LEGACY_VERSION_JAVA_FILE_PATH);
153-
try (FileInputStream fis = new FileInputStream(versionsFile); FileInputStream fis2 = new FileInputStream(legacyVersionsFile)) {
152+
try (FileInputStream fis = new FileInputStream(versionsFile)) {
154153
List<String> versionLines = IOUtils.readLines(fis, "UTF-8");
155-
versionLines.addAll(IOUtils.readLines(fis2, "UTF-8"));
156154
return new BwcVersions(versionLines);
157155
} catch (IOException e) {
158156
throw new IllegalStateException("Unable to resolve bwc versions from versionsFile.", e);

distribution/packages/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ subprojects {
450450
artifacts {
451451
'default' buildDist
452452
}
453+
tasks.named("assemble").configure { dependsOn(parent.tasks.named(buildTask)) }
453454

454455
if (dpkgExists() || rpmExists()) {
455456

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protobuf = "3.25.8"
2727
jakarta_annotation = "1.3.5"
2828
google_http_client = "1.44.1"
2929
google_auth = "1.29.0"
30-
tdigest = "3.3"
30+
tdigest = "3.3" # Warning: Before updating tdigest, ensure its serialization code for MergingDigest hasn't changed
3131
hdrhistogram = "2.2.2"
3232
grpc = "1.75.0"
3333
json_smart = "2.5.2"

gradle/run.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ testClusters {
6767
project.repositories {
6868
maven {
6969
name = 'OpenSearch Snapshots'
70-
url = 'https://central.sonatype.com/repository/maven-snapshots/'
70+
url = 'https://ci.opensearch.org/ci/dbc/snapshots/maven/'
7171
}
7272
}
7373
if (p.contains(':')) {

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public FilePartitionConsumer(FileSourceConfig config, int shardId) {
6262
public List<ReadResult<FileOffset, FileMessage>> readNext(FileOffset offset, boolean includeStart, long maxMessages, int timeoutMillis)
6363
throws TimeoutException {
6464
long startLine = includeStart ? offset.getLine() : offset.getLine() + 1;
65-
lastReadLine = startLine;
6665
return readFromFile(startLine, maxMessages);
6766
}
6867

@@ -155,6 +154,22 @@ public int getShardId() {
155154
return shardId;
156155
}
157156

157+
@Override
158+
public long getPointerBasedLag(IngestionShardPointer expectedStartPointer) {
159+
if (!shardFile.exists()) {
160+
return 0;
161+
}
162+
163+
FileOffset latestOffset = (FileOffset) latestPointer();
164+
if (lastReadLine < 0) {
165+
// Haven't read anything yet, use the expected start pointer
166+
long startLine = ((FileOffset) expectedStartPointer).getLine();
167+
return Math.max(0, latestOffset.getLine() - startLine);
168+
}
169+
// return lag as number of remaining lines from lastReadLineNumber
170+
return latestOffset.getLine() - lastReadLine - 1;
171+
}
172+
158173
@Override
159174
public void close() throws IOException {
160175
if (reader != null) {

0 commit comments

Comments
 (0)