Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -206,12 +206,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
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