Skip to content

Commit faa1fb7

Browse files
author
Andrew Clegg
committed
Merge branch 'release/2.1.4'
2 parents 38d6a6c + 524227a commit faa1fb7

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Release 2.1.3
22
-------------
33

4+
Fixed a race condition in BytesRefUtils.
5+
6+
Release 2.1.3
7+
-------------
8+
49
Better checking for incorrect usage of distinct count payloads, and terminology improvements.
510

611
Added "sample" parameter for term list facet's equivalent of approximate mode.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Plugin < 1.3.0: ElasticSearch 0.19.X, tested on 0.19.11
1717

1818
Plugin 1.3.X: ElasticSearch 0.20.X, tested on 0.20.6
1919

20-
Plugin 2.1.3: ElasticSearch 0.90.2, plus significant feature and performance improvements, and breaking API changes
20+
Plugin 2.1.4: ElasticSearch 0.90.2, plus significant feature and performance improvements, and breaking API changes
2121

2222
ElasticSearch 0.90.3 is not supported yet.
2323

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.pearson.entech</groupId>
55
<artifactId>elasticsearch-approx-plugin</artifactId>
6-
<version>2.1.3</version>
6+
<version>2.1.4</version>
77
<properties>
88
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
99
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

src/main/java/com/pearson/entech/elasticsearch/plugin/approx/BytesRefUtils.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class BytesRefUtils {
1818

1919
/** The compact() method on BytesRefHash objects. */
20-
private static Method __compact;
20+
private static volatile Method __compact;
2121

2222
/** An empty array of objects: the params required for reflective-invocation of __compact. */
2323
private static final Object[] __emptyParams = {};
@@ -45,15 +45,16 @@ public static interface Procedure {
4545
private static Method getCompactMethod() {
4646
if(__compact != null)
4747
return __compact;
48+
Method compact;
4849
try {
49-
__compact = BytesRefHash.class.getDeclaredMethod("compact", new Class[0]);
50+
compact = BytesRefHash.class.getDeclaredMethod("compact", new Class[0]);
5051
} catch(final SecurityException e) {
5152
throw new RuntimeException(e);
5253
} catch(final NoSuchMethodException e) {
5354
throw new RuntimeException(e);
5455
}
55-
__compact.setAccessible(true);
56-
return __compact;
56+
compact.setAccessible(true);
57+
return __compact = compact;
5758
}
5859

5960
/**

0 commit comments

Comments
 (0)