InternalClusterInfoService.shardIdentifierFromRouting(String)
* for the key used in the shardSizes map
*/
@@ -59,9 +59,10 @@ public class ClusterInfo implements ChunkedToXContent, Writeable {
final Mapnull
if that metric is not available.
*/
@@ -331,7 +352,9 @@ public boolean equals(Object o) {
&& shardDataSetSizes.equals(that.shardDataSetSizes)
&& dataPath.equals(that.dataPath)
&& reservedSpace.equals(that.reservedSpace)
- && nodeUsageStatsForThreadPools.equals(that.nodeUsageStatsForThreadPools);
+ && estimatedHeapUsages.equals(that.estimatedHeapUsages)
+ && nodeUsageStatsForThreadPools.equals(that.nodeUsageStatsForThreadPools)
+ && shardWriteLoads.equals(that.shardWriteLoads);
}
@Override
@@ -343,7 +366,9 @@ public int hashCode() {
shardDataSetSizes,
dataPath,
reservedSpace,
- nodeUsageStatsForThreadPools
+ estimatedHeapUsages,
+ nodeUsageStatsForThreadPools,
+ shardWriteLoads
);
}
@@ -466,6 +491,7 @@ public static class Builder {
private Map+ * This operation, together with {@link #compareAndSetRegister}, must have linearizable semantics: a collection of such operations must + * act as if they operate serially, with each operation taking place at some instant in between its invocation and its completion. * * @param purpose The purpose of the operation * @param key key of the value to update @@ -323,9 +326,12 @@ void compareAndExchangeRegister( /** * Atomically sets the value stored at the given key to {@code updated} if the {@code current value == expected}. - * Keys not yet used start at initial value 0. + * If a key has not yet been used as a register, its initial value is an empty {@link BytesReference}. + *
+ * This operation, together with {@link #compareAndExchangeRegister}, must have linearizable semantics: a collection of such operations + * must act as if they operate serially, with each operation taking place at some instant in between its invocation and its completion. * - * @param purpose + * @param purpose The purpose of the operation * @param key key of the value to update * @param expected the expected value * @param updated the new value @@ -350,7 +356,12 @@ default void compareAndSetRegister( /** * Gets the value set by {@link #compareAndSetRegister} or {@link #compareAndExchangeRegister} for a given key. - * If a key has not yet been used, the initial value is an empty {@link BytesReference}. + * If a key has not yet been used as a register, its initial value is an empty {@link BytesReference}. + *
+ * This operation has read-after-write consistency with respect to writes performed using {@link #compareAndExchangeRegister} and + * {@link #compareAndSetRegister}, but does not guarantee full linearizability. In particular, a {@code getRegister} performed during + * one of these write operations may return either the old or the new value, and a caller may therefore observe the old value + * after observing the new value, as long as both such read operations take place before the write operation completes. * * @param purpose The purpose of the operation * @param key key of the value to get diff --git a/server/src/main/java/org/elasticsearch/common/blobstore/support/BlobContainerUtils.java b/server/src/main/java/org/elasticsearch/common/blobstore/support/BlobContainerUtils.java index 5019f41a01a4f..32e6852febf8c 100644 --- a/server/src/main/java/org/elasticsearch/common/blobstore/support/BlobContainerUtils.java +++ b/server/src/main/java/org/elasticsearch/common/blobstore/support/BlobContainerUtils.java @@ -33,9 +33,9 @@ public static void ensureValidRegisterContent(BytesReference bytesReference) { } /** - * Many blob stores have consistent (linearizable/atomic) read semantics and in these casees it is safe to implement {@link - * BlobContainer#getRegister} by simply reading the blob using this utility. - * + * Many blob stores have consistent read-after-write semantics and in these cases it is safe to implement + * {@link BlobContainer#getRegister} by simply reading the blob using this utility. + *
* NB it is not safe for the supplied stream to resume a partial downloads, because the resumed stream may see a different state from
* the original.
*/
diff --git a/server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java b/server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java
index 9f4c5b80ccf23..68406bb6730a0 100644
--- a/server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java
+++ b/server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java
@@ -175,6 +175,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
MapperService.INDEX_MAPPING_DIMENSION_FIELDS_LIMIT_SETTING,
MapperService.INDEX_MAPPING_FIELD_NAME_LENGTH_LIMIT_SETTING,
MapperService.INDEX_MAPPER_DYNAMIC_SETTING,
+ MapperService.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING,
BitsetFilterCache.INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING,
IndexModule.INDEX_STORE_TYPE_SETTING,
IndexModule.INDEX_STORE_PRE_LOAD_SETTING,
@@ -206,6 +207,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
IndexSettings.INDEX_MAPPER_SOURCE_MODE_SETTING,
IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE_SETTING,
InferenceMetadataFieldsMapper.USE_LEGACY_SEMANTIC_TEXT_FORMAT,
+ // IndexSettings.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING,
// validate that built-in similarities don't get redefined
Setting.groupSetting("index.similarity.", (s) -> {
diff --git a/server/src/main/java/org/elasticsearch/health/node/selection/HealthNodeTaskExecutor.java b/server/src/main/java/org/elasticsearch/health/node/selection/HealthNodeTaskExecutor.java
index 0a7451702ec66..2eeb8c470b5d8 100644
--- a/server/src/main/java/org/elasticsearch/health/node/selection/HealthNodeTaskExecutor.java
+++ b/server/src/main/java/org/elasticsearch/health/node/selection/HealthNodeTaskExecutor.java
@@ -16,12 +16,14 @@
import org.elasticsearch.cluster.ClusterChangedEvent;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateListener;
+import org.elasticsearch.cluster.metadata.ProjectId;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.node.NodeClosedException;
import org.elasticsearch.persistent.AllocatedPersistentTask;
@@ -133,10 +135,11 @@ protected HealthNode createTask(
* Returns the node id from the eligible health nodes
*/
@Override
- public PersistentTasksCustomMetadata.Assignment getAssignment(
+ protected PersistentTasksCustomMetadata.Assignment doGetAssignment(
HealthNodeTaskParams params,
Collection