Skip to content

Commit

Permalink
Fix integer overflow for remaining index stats
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <vachshah@amazon.com>
  • Loading branch information
VachaShah committed Feb 22, 2024
1 parent a1bf415 commit 22fc7a3
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class QueryCacheStats implements JsonpSerializable {
@Nullable
private final String memorySize;

private final int memorySizeInBytes;
private final long memorySizeInBytes;

private final int missCount;

Expand Down Expand Up @@ -124,7 +124,7 @@ public final String memorySize() {
/**
* Required - API name: {@code memory_size_in_bytes}
*/
public final int memorySizeInBytes() {
public final long memorySizeInBytes() {
return this.memorySizeInBytes;
}

Expand Down Expand Up @@ -199,7 +199,7 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder<Q
@Nullable
private String memorySize;

private Integer memorySizeInBytes;
private Long memorySizeInBytes;

private Integer missCount;

Expand Down Expand Up @@ -248,7 +248,7 @@ public final Builder memorySize(@Nullable String value) {
/**
* Required - API name: {@code memory_size_in_bytes}
*/
public final Builder memorySizeInBytes(int value) {
public final Builder memorySizeInBytes(long value) {
this.memorySizeInBytes = value;
return this;
}
Expand Down Expand Up @@ -299,7 +299,7 @@ protected static void setupQueryCacheStatsDeserializer(ObjectDeserializer<QueryC
op.add(Builder::evictions, JsonpDeserializer.integerDeserializer(), "evictions");
op.add(Builder::hitCount, JsonpDeserializer.integerDeserializer(), "hit_count");
op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size");
op.add(Builder::memorySizeInBytes, JsonpDeserializer.integerDeserializer(), "memory_size_in_bytes");
op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes");
op.add(Builder::missCount, JsonpDeserializer.integerDeserializer(), "miss_count");
op.add(Builder::totalCount, JsonpDeserializer.integerDeserializer(), "total_count");

Expand Down
Loading

0 comments on commit 22fc7a3

Please sign in to comment.