Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix circular dependency in Settings initialization #10194

Merged
merged 1 commit into from
Oct 2, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix broken backward compatibility from 2.7 for IndexSorted field indices ([#10045](https://github.com/opensearch-project/OpenSearch/pull/10045))
- Fix concurrent search NPE when track_total_hits, terminate_after and size=0 are used ([#10082](https://github.com/opensearch-project/OpenSearch/pull/10082))
- Fix remove ingest processor handing ignore_missing parameter not correctly ([10089](https://github.com/opensearch-project/OpenSearch/pull/10089))
- Fix circular dependency in Settings initialization ([10194](https://github.com/opensearch-project/OpenSearch/pull/10194))

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
@PublicApi(since = "1.0.0")
public final class Settings implements ToXContentFragment {

public static final Settings EMPTY = new Builder().build();
public static final Settings EMPTY = new Settings(Collections.emptyMap(), null);

/** The raw settings from the full key to raw string value. */
private final Map<String, Object> settings;
Expand Down Expand Up @@ -757,7 +757,7 @@ public Set<String> keySet() {
@PublicApi(since = "1.0.0")
public static class Builder {

public static final Settings EMPTY_SETTINGS = new Builder().build();
public static final Settings EMPTY_SETTINGS = Settings.EMPTY;

// we use a sorted map for consistent serialization when using getAsMap()
private final Map<String, Object> map = new TreeMap<>();
Expand Down
Loading