Skip to content
Merged
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
6 changes: 0 additions & 6 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,6 @@ tests:
issue: https://github.com/elastic/elasticsearch/issues/120964
- class: org.elasticsearch.xpack.ml.integration.PyTorchModelIT
issue: https://github.com/elastic/elasticsearch/issues/121165
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=transform/*}
issue: https://github.com/elastic/elasticsearch/issues/120816
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=ml/*}
issue: https://github.com/elastic/elasticsearch/issues/120816
- class: org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactoryTests
issue: https://github.com/elastic/elasticsearch/issues/121285
- class: org.elasticsearch.env.NodeEnvironmentTests
Expand Down
11 changes: 11 additions & 0 deletions x-pack/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ tasks.named("yamlRestCompatTestTransform").configure({ task ->
task.skipTest("esql/40_tsdb/from index pattern unsupported counter", "TODO: support for subset of metric fields")
task.skipTest("esql/40_unsupported_types/unsupported", "TODO: support for subset of metric fields")
task.skipTest("esql/40_unsupported_types/unsupported with sort", "TODO: support for subset of metric fields")
task.skipTest("ml/3rd_party_deployment/Test clear deployment cache", "Deprecated route removed")
task.skipTest("ml/3rd_party_deployment/Test start and stop deployment with cache", "Deprecated route removed")
task.skipTest("ml/3rd_party_deployment/Test start and stop multiple deployments", "Deprecated route removed")
task.skipTest("ml/3rd_party_deployment/Test update model alias on pytorch model to undeployed model", "Deprecated route removed")
task.skipTest("ml/job_cat_apis/Test cat anomaly detector jobs", "Flush API is deprecated")
task.skipTest("ml/jobs_get_stats/Test get job stats after uploading data prompting the creation of some stats", "Flush API is deprecated")
task.skipTest("ml/jobs_get_stats/Test get job stats for closed job", "Flush API is deprecated")
task.skipTest("ml/inference_crud/Test deprecation of include model definition param", "Query parameter removed")
task.skipTest("ml/post_data/Test flush and close job WITHOUT sending any data", "Flush API is deprecated")
task.skipTest("ml/post_data/Test flush with skip_time", "Flush API is deprecated")
task.skipTest("ml/post_data/Test POST data job api, flush, close and verify DataCounts doc", "Flush API is deprecated")
task.replaceValueInMatch("Size", 49, "Test flamegraph from profiling-events")
task.replaceValueInMatch("Size", 49, "Test flamegraph from test-events")
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ public void error(String resourceId, String message) {
*/
public void reset() {
indexAndAliasCreated.set(false);
if (backlog == null) {
// create a new backlog in case documents need
// to be temporarily stored when the new index/alias is created
backlog = new ConcurrentLinkedQueue<>();
}
// create a new backlog in case documents need
// to be temporarily stored when the new index/alias is created
backlog = new ConcurrentLinkedQueue<>();
}

private static void onIndexResponse(DocWriteResponse response) {
Expand Down Expand Up @@ -134,14 +132,13 @@ protected void indexDoc(ToXContent toXContent) {
if (indexAndAliasCreated.get() == false) {
// synchronized so that hasLatestTemplate does not change value
// between the read and adding to the backlog
assert backlog != null;
if (backlog != null) {
if (backlog.size() >= MAX_BUFFER_SIZE) {
backlog.remove();
}
backlog.add(toXContent);
} else {
logger.error("Latest audit template missing and audit message cannot be added to the backlog");
logger.error("Audit message cannot be added to the backlog");
}

// stop multiple invocations
Expand Down Expand Up @@ -186,7 +183,6 @@ protected void clearBacklog() {
}

protected void writeBacklog() {
assert backlog != null;
if (backlog == null) {
logger.debug("Message back log has already been written");
return;
Expand Down