Skip to content

Commit

Permalink
Fix Cache breaking change
Browse files Browse the repository at this point in the history
Signed-off-by: Sagar Upadhyaya <[email protected]>
  • Loading branch information
sgup432 committed Oct 8, 2024
1 parent 96082f7 commit 2f00455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/main/java/org/opensearch/common/cache/Cache.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ public class Cache<K, V> {
private RemovalListener<K, V> removalListener = notification -> {};

private final int numberOfSegments;
private static final int NUMBER_OF_SEGMENTS_DEFAULT = 256;
public static final int NUMBER_OF_SEGMENTS = 256;

Cache(final int numberOfSegments) {
if (numberOfSegments != -1) {
this.numberOfSegments = numberOfSegments;
} else {
this.numberOfSegments = NUMBER_OF_SEGMENTS_DEFAULT;
this.numberOfSegments = NUMBER_OF_SEGMENTS;
}
this.segments = new CacheSegment[this.numberOfSegments];
for (int i = 0; i < this.numberOfSegments; i++) {
Expand Down

0 comments on commit 2f00455

Please sign in to comment.