Skip to content

Commit

Permalink
Fix condition and parameter order for field cache utilization metric
Browse files Browse the repository at this point in the history
Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
  • Loading branch information
lukas-vlcek committed Apr 17, 2024
1 parent 8bd0ad9 commit 48b11ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- [Bug] Check phase name before SearchRequestOperationsListener onPhaseStart ([#12035](https://github.com/opensearch-project/OpenSearch/pull/12035))
- Fix Span operation names generated from RestActions ([#12005](https://github.com/opensearch-project/OpenSearch/pull/12005))
- Fix error in RemoteSegmentStoreDirectory when debug logging is enabled ([#12328](https://github.com/opensearch-project/OpenSearch/pull/12328))
- Fix condition and parameter order for field cache utilization metric ([#13232](https://github.com/opensearch-project/OpenSearch/pull/13232))

### Security

Expand Down
4 changes: 2 additions & 2 deletions server/src/main/java/org/opensearch/monitor/fs/FsInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
if (fileCacheReserved != -1) {
builder.humanReadableField(Fields.CACHE_RESERVED_IN_BYTES, Fields.CACHE_RESERVED, getFileCacheReserved());
}
if (fileCacheReserved != 0) {
builder.humanReadableField(Fields.CACHE_UTILIZED, Fields.CACHE_UTILIZED_IN_BYTES, getFileCacheUtilized());
if (fileCacheUtilized != 0) {
builder.humanReadableField(Fields.CACHE_UTILIZED_IN_BYTES, Fields.CACHE_UTILIZED, getFileCacheUtilized());
}

builder.endObject();
Expand Down

0 comments on commit 48b11ef

Please sign in to comment.