Skip to content

Commit

Permalink
Fix Cache backward compatibility breaking change (opensearch-project#…
Browse files Browse the repository at this point in the history
…16238)

* Fix Cache breaking change

Signed-off-by: Sagar Upadhyaya <[email protected]>

* Empty commit to trigger build

Signed-off-by: Sagar Upadhyaya <[email protected]>

---------

Signed-off-by: Sagar Upadhyaya <[email protected]>
  • Loading branch information
sgup432 authored and dk2k committed Oct 21, 2024
1 parent 10eaafd commit 3d21001
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 3d21001

Please sign in to comment.