Skip to content

Commit 8e0e8ee

Browse files
authored
Merge branch 'elastic:main' into feature/data_stream_in_search_hit
2 parents 9545aec + 3a8f3a7 commit 8e0e8ee

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

docs/reference/elasticsearch/mapping-reference/semantic-text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ the embedding generation, indexing, and query to use.
3535

3636
{applies_to}`stack: ga 9.1` Newly created indices with `semantic_text` fields using dense embeddings will be
3737
[quantized](/reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization)
38-
to `bbq_hnsw` automatically.
38+
to `bbq_hnsw` automatically as long as they have a minimum of 64 dimensions.
3939

4040
## Default and custom endpoints
4141

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,6 @@ tests:
449449
- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT
450450
method: testCancellationViaTimeoutWithAllowPartialResultsSetToFalse
451451
issue: https://github.com/elastic/elasticsearch/issues/131248
452-
- class: org.elasticsearch.action.admin.cluster.node.tasks.CancellableTasksIT
453-
method: testRemoveBanParentsOnDisconnect
454-
issue: https://github.com/elastic/elasticsearch/issues/131562
455452
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT
456453
method: testPartialResults
457454
issue: https://github.com/elastic/elasticsearch/issues/131481

server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ public void testRemoveBanParentsOnDisconnect() throws Exception {
363363
allowEntireRequest(rootRequest);
364364
cancelFuture.actionGet();
365365
ensureBansAndCancellationsConsistency();
366+
// This method will call the cluster health API with wait_for_tasks set to Priority#LANGUID. This will ensure that all tasks
367+
// currently submitted to the master service (included re-election after a disconnect) are processed before returning. This
368+
// ensures cluster stability for the post-test consistency checks.
369+
ensureStableCluster(nodes.size());
366370
}
367371
}
368372

server/src/main/java/org/elasticsearch/cluster/service/ClusterApplierService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,6 @@ private void runTask(String source, Function<ClusterState, ClusterState> updateF
469469
);
470470
warnAboutSlowTaskIfNeeded(executionTime, source, stopWatch);
471471
} catch (Exception e) {
472-
// failing to apply a cluster state with an exception indicates a bug in validation or in one of the appliers; if we
473-
// continue we will retry with the same cluster state but that might not help.
474-
assert applicationMayFail();
475472
timedListener.onFailure(e);
476473
TimeValue executionTime = getTimeSince(startTimeMillis);
477474
if (logger.isTraceEnabled()) {
@@ -492,6 +489,9 @@ private void runTask(String source, Function<ClusterState, ClusterState> updateF
492489
e
493490
);
494491
}
492+
// failing to apply a cluster state with an exception indicates a bug in validation or in one of the appliers; if we
493+
// continue we will retry with the same cluster state but that might not help.
494+
assert applicationMayFail();
495495
} finally {
496496
clearIsApplyingClusterState();
497497
}

test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,15 @@ private void setMultiProjectParams(Map<String, String> xContentParams) {
13821382
}
13831383
}
13841384

1385+
/**
1386+
* Verifies that all nodes in the cluster see the same master node and cluster UUID and use the same JSON serialization.
1387+
* <ul>
1388+
* <li> Fetches the cluster state from every node in the cluster </li>
1389+
* <li> Fetches the master node's view of the cluster state </li>
1390+
* <li> Compares each node's view with the master node's </li>
1391+
* </ul>
1392+
* @param namedWriteableRegistry
1393+
*/
13851394
protected final void doEnsureClusterStateConsistency(NamedWriteableRegistry namedWriteableRegistry) {
13861395
// This check has very little value in external test clusters and there is no guaranteed method of obtaining the master cluster
13871396
// state in those clusters.
@@ -1409,6 +1418,10 @@ protected final void doEnsureClusterStateConsistency(NamedWriteableRegistry name
14091418
);
14101419
Map<String, Object> masterStateMap = convertToMap(masterClusterState, xContentParams());
14111420
String masterId = masterClusterState.nodes().getMasterNodeId();
1421+
if (masterId == null) {
1422+
logger.warn("Failed to find an elected master in the cluster state: " + masterClusterState);
1423+
throw new AssertionError("Unable to find master in cluster state. Expecting a stable master node");
1424+
}
14121425
for (SubscribableListener<ClusterStateResponse> localStateListener : localStates) {
14131426
localStateListener.andThenAccept(localClusterStateResponse -> {
14141427
byte[] localClusterStateBytes = ClusterState.Builder.toBytes(localClusterStateResponse.getState());

0 commit comments

Comments
 (0)