Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Implement GRPC Search params `Highlight`and `Sort` ([#19868](https://github.com/opensearch-project/OpenSearch/pull/19868))
- Implement GRPC ConstantScoreQuery, FuzzyQuery, MatchBoolPrefixQuery, MatchPhrasePrefix, PrefixQuery, MatchQuery ([#19854](https://github.com/opensearch-project/OpenSearch/pull/19854))
- Add async periodic flush task support for pull-based ingestion ([#19878](https://github.com/opensearch-project/OpenSearch/pull/19878))
- [prone] Add `UnusedMethod` ([#19896](https://github.com/opensearch-project/OpenSearch/pull/19896))

### Changed
- Faster `terms` query creation for `keyword` field with index and docValues enabled ([#19350](https://github.com/opensearch-project/OpenSearch/pull/19350))
Expand Down
8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ plugins {
id "org.gradle.test-retry" version "1.6.2" apply false
id "test-report-aggregation"
id 'jacoco-report-aggregation'
id 'net.ltgt.errorprone' version '4.3.0' apply false
}

apply from: 'gradle/build-complete.gradle'
Expand All @@ -71,13 +72,10 @@ apply from: 'gradle/run.gradle'
apply from: 'gradle/missing-javadoc.gradle'
apply from: 'gradle/code-coverage.gradle'

// Apply FIPS configuration to all projects
allprojects {
apply from: "$rootDir/gradle/error-prone.gradle"
apply from: "$rootDir/gradle/fips.gradle"
}

// common maven publishing configuration
allprojects {
// common maven publishing configuration
group = 'org.opensearch'
version = VersionProperties.getOpenSearch()
description = "OpenSearch subproject ${project.path}"
Expand Down
50 changes: 50 additions & 0 deletions gradle/error-prone.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

apply plugin: 'net.ltgt.errorprone'

tasks.withType(JavaCompile).configureEach {
options.errorprone {
disableAllChecks = true // remove once complain
error(
'UnusedMethod'
)
errorproneArgs.add(
'-XepExcludedPaths:' +
'.*AggregatorTestCase.java|' + // https://github.com/google/error-prone/issues/5289
'.*FactoryProvider.java|' +
'.*IT.java|' + // 6+ findings
'.*MockBigArrays.java|' +
'.*MoreTypes.java|' +
'.*OpenSearchNode.java|' +
'.*SnapshotsService.java|' +
'.*Terms.java|' +
'.*Tests.java|' + // 15+ findings
'.*x-content.*' // generated code
)
}
}

dependencies {
errorprone('com.google.errorprone:error_prone_core:2.42.0')
errorprone('tech.picnic.error-prone-support:error-prone-contrib:0.25.0')
}

configurations.configureEach { // remove once in sync (collision resolved)
resolutionStrategy {
force 'com.google.code.findbugs:jsr305:3.0.2'
force 'com.google.errorprone:error_prone_annotations:2.42.0'
force 'com.google.errorprone:error_prone_core:2.42.0'
force 'com.google.guava:guava:33.4.0-jre'
force 'org.checkerframework:checker-qual:3.43.0'
}
}

repositories {
mavenCentral()
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
57a3eddaddd4f2d412e13d3bcefba29b5ebda1b6

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
03fcc0a259f724c7de54a6a55ea7e26d3d5c0cac

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
57a3eddaddd4f2d412e13d3bcefba29b5ebda1b6

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
03fcc0a259f724c7de54a6a55ea7e26d3d5c0cac
1 change: 0 additions & 1 deletion plugins/discovery-gce/licenses/guava-33.2.1-jre.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions plugins/discovery-gce/licenses/guava-33.4.0-jre.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
03fcc0a259f724c7de54a6a55ea7e26d3d5c0cac

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
03fcc0a259f724c7de54a6a55ea7e26d3d5c0cac

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
03fcc0a259f724c7de54a6a55ea7e26d3d5c0cac
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9425eee39e56b116d2b998b7c2cebcbd11a3c98b

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
03fcc0a259f724c7de54a6a55ea7e26d3d5c0cac
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,6 @@ public static final class EmptyResult implements Writeable {

private EmptyResult() {}

private EmptyResult(StreamInput in) {}

@Override
public void writeTo(StreamOutput out) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,6 @@ private class NodeTasksResponse extends TransportResponse {
this.exceptions = exceptions;
}

public String getNodeId() {
return nodeId;
}

public List<TaskOperationFailure> getExceptions() {
return exceptions;
}

@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(nodeId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

package org.opensearch.common.inject.matcher;

import org.opensearch.common.SuppressForbidden;

import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down Expand Up @@ -72,10 +70,6 @@ public boolean matches(Object o) {
public String toString() {
return "any()";
}

public Object readResolve() {
return any();
}
}

/**
Expand Down Expand Up @@ -372,12 +366,6 @@ public int hashCode() {
public String toString() {
return "inPackage(" + targetPackage.getName() + ")";
}

@SuppressForbidden(reason = "ClassLoader.getDefinedPackage not available yet")
public Object readResolve() {
// TODO minJava >= 9 : use ClassLoader.getDefinedPackage and remove @SuppressForbidden
return inPackage(Package.getPackage(packageName));
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ public final class InjectionPoint {
private final Member member;
private final List<Dependency<?>> dependencies;

private InjectionPoint(Member member, List<Dependency<?>> dependencies, boolean optional) {
this.member = member;
this.dependencies = dependencies;
this.optional = optional;
}

InjectionPoint(TypeLiteral<?> type, Method method) {
this.member = method;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,6 @@ private JavaDateFormatter(
this.canCacheLastParsedFormatter = canCacheLastParsedFormatter;
}

private JavaDateFormatter(
String format,
DateTimeFormatter printer,
List<DateTimeFormatter> roundUpParsers,
List<DateTimeFormatter> parsers
) {
this(format, format, wrapFormatter(printer), wrapAllFormatters(roundUpParsers), wrapAllFormatters(parsers), false);
}

private JavaDateFormatter(
String format,
OpenSearchDateTimePrinter printer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
import org.opensearch.ExceptionsHelper;
import org.opensearch.OpenSearchException;
import org.opensearch.Version;
import org.opensearch.cluster.ClusterChangedEvent;
import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.ClusterStateApplier;
import org.opensearch.cluster.coordination.CoordinationMetadata;
import org.opensearch.cluster.coordination.CoordinationState.PersistedState;
import org.opensearch.cluster.coordination.InMemoryPersistedState;
Expand Down Expand Up @@ -379,40 +377,6 @@ private static boolean applyPluginUpgraders(
return false;
}

private static class GatewayClusterApplier implements ClusterStateApplier {

private static final Logger logger = LogManager.getLogger(GatewayClusterApplier.class);

private final IncrementalClusterStateWriter incrementalClusterStateWriter;

private GatewayClusterApplier(IncrementalClusterStateWriter incrementalClusterStateWriter) {
this.incrementalClusterStateWriter = incrementalClusterStateWriter;
}

@Override
public void applyClusterState(ClusterChangedEvent event) {
if (event.state().blocks().disableStatePersistence()) {
incrementalClusterStateWriter.setIncrementalWrite(false);
return;
}

try {
// Hack: This is to ensure that non-cluster-manager-eligible Zen2 nodes always store a current term
// that's higher than the last accepted term.
// TODO: can we get rid of this hack?
if (event.state().term() > incrementalClusterStateWriter.getPreviousManifest().getCurrentTerm()) {
incrementalClusterStateWriter.setCurrentTerm(event.state().term());
}

incrementalClusterStateWriter.updateClusterState(event.state());
incrementalClusterStateWriter.setIncrementalWrite(true);
} catch (WriteStateException e) {
logger.warn("Exception occurred when storing new meta data", e);
}
}

}

@Override
public void close() throws IOException {
IOUtils.close(persistedStateRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,6 @@ public int size() {
return fileMetadataMap.size();
}

public boolean isEmpty() {
return fileMetadataMap.isEmpty();
}

public void clear() {
fileMetadataMap.clear();
complete = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,5 @@ public void close() throws IOException {}
public void reset() throws IOException {
size = 0;
}

public long length() {
return size;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,22 +237,6 @@ static class CollapsingTopDocsCollectorContext extends TopDocsCollectorContext {
private final boolean sortByScore;
private final FieldDoc searchAfter;

/**
* Ctr
* @param collapseContext The collapsing context
* @param sortAndFormats The query sort
* @param numHits The number of collapsed top hits to retrieve.
* @param trackMaxScore True if max score should be tracked
*/
private CollapsingTopDocsCollectorContext(
CollapseContext collapseContext,
@Nullable SortAndFormats sortAndFormats,
int numHits,
boolean trackMaxScore
) {
this(collapseContext, sortAndFormats, numHits, trackMaxScore, null);
}

/**
* Ctr
* @param collapseContext The collapsing context
Expand Down
Loading