Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into resource-permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
DarshitChanpura committed Dec 18, 2024
2 parents eb43578 + b5f651f commit bcd0f2b
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Bump Apache Lucene from 9.12.0 to 9.12.1 ([#16846](https://github.com/opensearch-project/OpenSearch/pull/16846))
- Bump `com.gradle.develocity` from 3.18.2 to 3.19 ([#16855](https://github.com/opensearch-project/OpenSearch/pull/16855))
- Bump `org.jline:jline` from 3.27.1 to 3.28.0 ([#16857](https://github.com/opensearch-project/OpenSearch/pull/16857))
- Bump `com.azure:azure-core` from 1.51.0 to 1.54.1 ([#16856](https://github.com/opensearch-project/OpenSearch/pull/16856))

### Changed
- Indexed IP field supports `terms_query` with more than 1025 IP masks [#16391](https://github.com/opensearch-project/OpenSearch/pull/16391)
Expand Down
4 changes: 2 additions & 2 deletions libs/core/src/main/java/org/opensearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public class Version implements Comparable<Version>, ToXContentFragment {
public static final Version V_2_17_1 = new Version(2170199, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_17_2 = new Version(2170299, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_18_0 = new Version(2180099, org.apache.lucene.util.Version.LUCENE_9_12_0);
public static final Version V_2_18_1 = new Version(2180199, org.apache.lucene.util.Version.LUCENE_9_12_0);
public static final Version V_2_19_0 = new Version(2190099, org.apache.lucene.util.Version.LUCENE_9_12_0);
public static final Version V_2_18_1 = new Version(2180199, org.apache.lucene.util.Version.LUCENE_9_12_1);
public static final Version V_2_19_0 = new Version(2190099, org.apache.lucene.util.Version.LUCENE_9_12_1);
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_12_1);
public static final Version CURRENT = V_3_0_0;

Expand Down
3 changes: 1 addition & 2 deletions plugins/repository-azure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ opensearchplugin {
}

dependencies {
api 'com.azure:azure-core:1.51.0'
api 'com.azure:azure-core:1.54.1'
api 'com.azure:azure-json:1.3.0'
api 'com.azure:azure-xml:1.1.0'
api 'com.azure:azure-storage-common:12.28.0'
Expand Down Expand Up @@ -108,7 +108,6 @@ thirdPartyAudit {
// Optional and not enabled by Elasticsearch
'com.google.common.util.concurrent.internal.InternalFutureFailureAccess',
'com.google.common.util.concurrent.internal.InternalFutures',
'com.azure.core.credential.ProofOfPossessionOptions',
'com.azure.storage.internal.avro.implementation.AvroObject',
'com.azure.storage.internal.avro.implementation.AvroReader',
'com.azure.storage.internal.avro.implementation.AvroReaderFactory',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9ae0cc4a8ff02a0146510ec9e1c06ab48950a66b
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,13 @@ private ClusterState getStateFromLocalNode(GetTermVersionResponse termVersionRes

if (remoteClusterStateService != null && termVersionResponse.isStatePresentInRemote()) {
try {
logger.info(
() -> new ParameterizedMessage(
"Term version checker downloading full cluster state for term {}, version {}",
termVersion.getTerm(),
termVersion.getVersion()
)
);
ClusterStateTermVersion clusterStateTermVersion = termVersionResponse.getClusterStateTermVersion();
Optional<ClusterMetadataManifest> clusterMetadataManifest = remoteClusterStateService
.getClusterMetadataManifestByTermVersion(
Expand All @@ -454,7 +461,7 @@ private ClusterState getStateFromLocalNode(GetTermVersionResponse termVersionRes
return clusterStateFromRemote;
}
} catch (Exception e) {
logger.trace("Error while fetching from remote cluster state", e);
logger.error("Error while fetching from remote cluster state", e);
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ PublishWithJoinResponse handleIncomingRemotePublishRequest(RemotePublishRequest
}

if (applyFullState == true) {
logger.debug(
logger.info(
() -> new ParameterizedMessage(
"Downloading full cluster state for term {}, version {}, stateUUID {}",
manifest.getClusterTerm(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1494,8 +1494,22 @@ public ClusterState getClusterStateForManifest(
try {
ClusterState stateFromCache = remoteClusterStateCache.getState(clusterName, manifest);
if (stateFromCache != null) {
logger.trace(
() -> new ParameterizedMessage(
"Found cluster state in cache for term {} and version {}",
manifest.getClusterTerm(),
manifest.getStateVersion()
)
);
return stateFromCache;
}
logger.info(
() -> new ParameterizedMessage(
"Cluster state not found in cache for term {} and version {}",
manifest.getClusterTerm(),
manifest.getStateVersion()
)
);

final ClusterState clusterState;
final long startTimeNanos = relativeTimeNanosSupplier.getAsLong();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public static ThreadPoolType fromType(String type) {
map.put(Names.REMOTE_PURGE, ThreadPoolType.SCALING);
map.put(Names.REMOTE_REFRESH_RETRY, ThreadPoolType.SCALING);
map.put(Names.REMOTE_RECOVERY, ThreadPoolType.SCALING);
map.put(Names.REMOTE_STATE_READ, ThreadPoolType.SCALING);
map.put(Names.REMOTE_STATE_READ, ThreadPoolType.FIXED);
map.put(Names.INDEX_SEARCHER, ThreadPoolType.RESIZABLE);
map.put(Names.REMOTE_STATE_CHECKSUM, ThreadPoolType.FIXED);
THREAD_POOL_TYPES = Collections.unmodifiableMap(map);
Expand Down Expand Up @@ -306,7 +306,7 @@ public ThreadPool(
);
builders.put(
Names.REMOTE_STATE_READ,
new ScalingExecutorBuilder(Names.REMOTE_STATE_READ, 1, boundedBy(4 * allocatedProcessors, 4, 32), TimeValue.timeValueMinutes(5))
new FixedExecutorBuilder(settings, Names.REMOTE_STATE_READ, boundedBy(4 * allocatedProcessors, 4, 32), 120000)
);
builders.put(
Names.INDEX_SEARCHER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2354,6 +2354,14 @@ public void testReadLatestClusterStateFromCache() throws IOException {
.getState(clusterState.getClusterName().value(), expectedManifest);
assertEquals(stateFromCache.getMetadata(), state.getMetadata());

ClusterState stateFromCache2 = remoteClusterStateService.getClusterStateForManifest(
clusterState.getClusterName().value(),
expectedManifest,
"nodeA",
true
);
assertEquals(stateFromCache2.getMetadata(), state.getMetadata());

final ClusterMetadataManifest notExistMetadata = ClusterMetadataManifest.builder()
.indices(List.of())
.clusterTerm(1L)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ private int expectedSize(final String threadPoolName, final int numberOfProcesso
sizes.put(ThreadPool.Names.REMOTE_PURGE, ThreadPool::halfAllocatedProcessors);
sizes.put(ThreadPool.Names.REMOTE_REFRESH_RETRY, ThreadPool::halfAllocatedProcessors);
sizes.put(ThreadPool.Names.REMOTE_RECOVERY, ThreadPool::twiceAllocatedProcessors);
sizes.put(ThreadPool.Names.REMOTE_STATE_READ, n -> ThreadPool.boundedBy(4 * n, 4, 32));
return sizes.get(threadPoolName).apply(numberOfProcessors);
}

Expand Down

0 comments on commit bcd0f2b

Please sign in to comment.