Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gashutos committed Nov 14, 2023
2 parents 2a4a430 + 6c980bc commit b198f6b
Show file tree
Hide file tree
Showing 537 changed files with 2,139 additions and 697 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
./gradlew updateSHAs
- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@v4.7.2
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Updating SHAs
branch: ${{ github.head_ref }}
Expand All @@ -40,7 +40,7 @@ jobs:
./gradlew spotlessApply
- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@v4.7.2
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Spotless formatting
branch: ${{ github.head_ref }}
Expand All @@ -54,7 +54,7 @@ jobs:
version: 'Unreleased 2.x'

- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update changelog"
branch: ${{ github.head_ref }}
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
### Gradle Check (Jenkins) Run Completed with:
* **RESULT:** ${{ env.result }} :white_check_mark:
* **URL:** ${{ env.workflow_url }}
* **CommitID:** ${{ env.pr_from_sha }}
:white_check_mark: Gradle check result for ${{ env.pr_from_sha }}: [${{ env.result }}](${{ env.workflow_url }})
- name: Extract Test Failure
if: ${{ github.event_name == 'pull_request_target' && env.result != 'SUCCESS' }}
Expand All @@ -108,10 +105,8 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
### Gradle Check (Jenkins) Run Completed with:
* **RESULT:** ${{ env.result }} :grey_exclamation: ${{ env.test_failures }}
* **URL:** ${{ env.workflow_url }}
* **CommitID:** ${{ env.pr_from_sha }}
:grey_exclamation: Gradle check result for ${{ env.pr_from_sha }}: [${{ env.result }}](${{ env.workflow_url }}) ${{ env.test_failures }}
Please review all [flaky tests](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) that succeeded after retry and create an issue if one does not already exist to track the flaky failure.
- name: Create Comment Failure
Expand All @@ -120,12 +115,9 @@ jobs:
with:
issue-number: ${{ env.pr_number }}
body: |
### Gradle Check (Jenkins) Run Completed with:
* **RESULT:** ${{ env.result }} :x: ${{ env.test_failures }}
* **URL:** ${{ env.workflow_url }}
* **CommitID:** ${{ env.pr_from_sha }}
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?
:x: Gradle check result for ${{ env.pr_from_sha }}: [${{ env.result }}](${{ env.workflow_url }})
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?
- name: Create Issue On Push Failure
if: ${{ github.event_name == 'push' && failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lucene-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: ./gradlew publishJarsPublicationToMavenLocal -Pversion.suffix=snapshot-${{ steps.version.outputs.REVISION }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.LUCENE_SNAPSHOTS_ROLE }}
aws-region: us-west-2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-maven-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
java-version: 17

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
aws-region: us-east-1
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Return 409 Conflict HTTP status instead of 503 on failure to concurrently execute snapshots ([#8986](https://github.com/opensearch-project/OpenSearch/pull/5855))
- Add task completion count in search backpressure stats API ([#10028](https://github.com/opensearch-project/OpenSearch/pull/10028/))
- Performance improvement for Datetime field caching ([#4558](https://github.com/opensearch-project/OpenSearch/issues/4558))
- Deprecate CamelCase `PathHierarchy` tokenizer name in favor to lowercase `path_hierarchy` ([#10894](https://github.com/opensearch-project/OpenSearch/pull/10894))


### Deprecated
Expand Down Expand Up @@ -115,6 +116,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Bump `com.google.http-client:google-http-client` from 1.43.2 to 1.43.3 ([#10635](https://github.com/opensearch-project/OpenSearch/pull/10635))
- Bump `com.squareup.okio:okio` from 3.5.0 to 3.6.0 ([#10637](https://github.com/opensearch-project/OpenSearch/pull/10637))
- Bump `org.apache.logging.log4j:log4j-core` from 2.20.0 to 2.21.1 ([#10858](https://github.com/opensearch-project/OpenSearch/pull/10858), [#11000](https://github.com/opensearch-project/OpenSearch/pull/11000))
- Bump `aws-actions/configure-aws-credentials` from 2 to 4 ([#10504](https://github.com/opensearch-project/OpenSearch/pull/10504))
- Bump `stefanzweifel/git-auto-commit-action` from 4 to 5 ([#11171](https://github.com/opensearch-project/OpenSearch/pull/11171))

### Changed
- Mute the query profile IT with concurrent execution ([#9840](https://github.com/opensearch-project/OpenSearch/pull/9840))
Expand All @@ -128,6 +131,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- [BUG] Disable sort optimization for HALF_FLOAT ([#10999](https://github.com/opensearch-project/OpenSearch/pull/10999))
- Performance improvement for MultiTerm Queries on Keyword fields ([#7057](https://github.com/opensearch-project/OpenSearch/issues/7057))
- Disable concurrent aggs for Diversified Sampler and Sampler aggs ([#11087](https://github.com/opensearch-project/OpenSearch/issues/11087))
- Made leader/follower check timeout setting dynamic ([#10528](https://github.com/opensearch-project/OpenSearch/pull/10528))
- Use iterative approach to evaluate Regex.simpleMatch ([#11060](https://github.com/opensearch-project/OpenSearch/pull/11060))

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@

package org.opensearch.common;

import org.opensearch.common.annotation.PublicApi;

import java.util.function.BiConsumer;

/**
* A {@link BiConsumer}-like interface which allows throwing checked exceptions.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
@FunctionalInterface
public interface CheckedBiConsumer<T, U, E extends Exception> {
void accept(T t, U u) throws E;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@

package org.opensearch.common;

import org.opensearch.common.annotation.PublicApi;

import java.util.function.Function;

/**
* A {@link Function}-like interface which allows throwing checked exceptions.
*
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
@FunctionalInterface
public interface CheckedFunction<T, R, E extends Exception> {
R apply(T t) throws E;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

package org.opensearch.common;

import org.opensearch.common.annotation.PublicApi;

/**
* Represents a function that accepts three arguments and produces a result.
*
Expand All @@ -40,8 +42,9 @@
* @param <U> the type of the third argument
* @param <R> the return type
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
@FunctionalInterface
public interface TriFunction<S, T, U, R> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@

package org.opensearch.common.collect;

import org.opensearch.common.annotation.PublicApi;

/**
* Java 9 Tuple
* todo: deprecate and remove w/ min jdk upgrade to 11?
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
public class Tuple<V1, V2> {

public static <V1, V2> Tuple<V1, V2> tuple(V1 v1, V2 v2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
*/
package org.opensearch.common.crypto;

import org.opensearch.common.annotation.ExperimentalApi;

import java.io.Closeable;
import java.util.Map;

/**
* Master key provider responsible for management of master keys.
*
* @opensearch.experimental
*/
@ExperimentalApi
public interface MasterKeyProvider extends Closeable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@

package org.opensearch.common.io;

import org.opensearch.common.annotation.ExperimentalApi;

import java.io.InputStream;

/**
* Model composed of an input stream and the total content length of the stream
*
* @opensearch.internal
* @opensearch.experimental
*/
@ExperimentalApi
public class InputStreamContainer {

private final InputStream inputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

package org.opensearch;

import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.rest.RestStatus;

Expand All @@ -40,8 +41,9 @@
/**
* Unchecked exception that is translated into a {@code 400 BAD REQUEST} error when it bubbles out over HTTP.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
public class OpenSearchParseException extends OpenSearchException {

public OpenSearchParseException(String msg, Object... args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@

package org.opensearch.core.action;

import org.opensearch.common.annotation.PublicApi;

import java.util.concurrent.atomic.AtomicBoolean;

/**
* A listener that ensures that only one of onResponse or onFailure is called. And the method
* the is called is only called once. Subclasses should implement notification logic with
* innerOnResponse and innerOnFailure.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
public abstract class NotifyOnceListener<Response> implements ActionListener<Response> {

private final AtomicBoolean hasBeenCalled = new AtomicBoolean(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
package org.opensearch.core.common.text;

import org.apache.lucene.util.BytesRef;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.bytes.BytesArray;
import org.opensearch.core.common.bytes.BytesReference;
import org.opensearch.core.xcontent.ToXContentFragment;
Expand All @@ -44,8 +45,9 @@
* Both {@link String} and {@link BytesReference} representation of the text. Starts with one of those, and if
* the other is requests, caches the other one in a local reference so no additional conversion will be needed.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
public final class Text implements Comparable<Text>, ToXContentFragment {

public static final Text[] EMPTY_ARRAY = new Text[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

package org.opensearch.core.common.transport;

import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.network.NetworkAddress;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
Expand All @@ -47,8 +48,9 @@
/**
* A transport address used for IP socket address (wraps {@link java.net.InetSocketAddress}).
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "1.0.0")
public final class TransportAddress implements Writeable, ToXContentFragment {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@

package org.opensearch.core.tasks.resourcetracker;

import org.opensearch.common.annotation.PublicApi;

/**
* Different resource stats are defined.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "2.1.0")
public enum ResourceStats {
CPU("cpu_time_in_nanos"),
MEMORY("memory_in_bytes");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@

package org.opensearch.core.tasks.resourcetracker;

import org.opensearch.common.annotation.PublicApi;

/**
* Defines the different types of resource stats.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "2.1.0")
public enum ResourceStatsType {
// resource stats of the worker thread reported directly from runnable.
WORKER_STATS("worker_stats", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.common.annotation.PublicApi;

import java.util.Collections;
import java.util.EnumMap;
Expand All @@ -22,8 +23,9 @@
* It captures the resource usage information like memory, CPU about a particular execution of thread
* for a specific stats type.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "2.1.0")
public class ResourceUsageInfo {
private static final Logger logger = LogManager.getLogger(ResourceUsageInfo.class);
private final EnumMap<ResourceStats, ResourceStatsInfo> statsInfo = new EnumMap<>(ResourceStats.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@

package org.opensearch.core.tasks.resourcetracker;

import org.opensearch.common.annotation.PublicApi;

/**
* Information about resource usage
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "2.1.0")
public class ResourceUsageMetric {
private final ResourceStats stats;
private final long value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package org.opensearch.core.tasks.resourcetracker;

import org.opensearch.Version;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.Strings;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
Expand All @@ -29,8 +30,9 @@
* Writeable TaskResourceStats objects are used to represent resource
* snapshot information about currently running task.
*
* @opensearch.internal
* @opensearch.api
*/
@PublicApi(since = "2.1.0")
public class TaskResourceStats implements Writeable, ToXContentFragment {
private final Map<String, TaskResourceUsage> resourceUsage;
private final TaskThreadUsage threadUsage;
Expand Down
Loading

0 comments on commit b198f6b

Please sign in to comment.