File tree 1 file changed +10
-6
lines changed
server/src/main/java/org/elasticsearch
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -302,10 +302,12 @@ private static class DeclaredVersionsHolder {
302
302
* is a beta or RC release then the version itself is returned.
303
303
*/
304
304
public Version minimumCompatibilityVersion () {
305
- if (minCompatVersion == null ) {
306
- minCompatVersion = computeMinCompatVersion ();
305
+ Version res = minCompatVersion ;
306
+ if (res == null ) {
307
+ res = computeMinCompatVersion ();
308
+ minCompatVersion = res ;
307
309
}
308
- return minCompatVersion ;
310
+ return res ;
309
311
}
310
312
311
313
private Version computeMinCompatVersion () {
@@ -340,10 +342,12 @@ private Version computeMinCompatVersion() {
340
342
* code that is used to read / write file formats like transaction logs, cluster state, and index metadata.
341
343
*/
342
344
public Version minimumIndexCompatibilityVersion () {
343
- if (minIndexCompatVersion == null ) {
344
- minIndexCompatVersion = computeMinIndexCompatVersion ();
345
+ Version res = minIndexCompatVersion ;
346
+ if (res == null ) {
347
+ res = computeMinIndexCompatVersion ();
348
+ minIndexCompatVersion = res ;
345
349
}
346
- return minIndexCompatVersion ;
350
+ return res ;
347
351
}
348
352
349
353
private Version computeMinIndexCompatVersion () {
You can’t perform that action at this time.
0 commit comments