On Wed, Feb 5, 2014 at 6:42 PM, Nils Dijk <[email protected]> wrote:

> Ok, I was preparing to do a long bisecting session, but I started with the
> commit you highlighted below (4271d573d60f39564c458e2d3fb7c14afb82d4d8)
> and the commit before that one (6481a2fde858520988f2ce28c02a15be3fe108e4).
> And as it turns out, it is the breaking commit.
>
> If I build the commit of yours from December 3 it fails my test suite.
> If I build the commit of Nik from Januari 6 it still passes my test.
>
> I also tried reverting your commit on the v1.0.0.RC1 tag, but it gave me
> all kinds of conflicts so I could not test RC1 without your commit.
>
> If you would like I can still do a full bisect, but I suspect I end up at
> your commit since I tested that one, and the one before.
>
> Would it be possible for you to send a .patch without the unsafe stuff, so
> I can apply that to a commit and make a build?
>

Thanks Nils for your work, this is much appreciated.

Here is a simple patch attached that short-circuits the use of Unsafe to do
string comparisons.

Maybe you could also try to set the `cache.recycler.page.type` setting to
`none` to see if that changes anything.

-- 
Adrien Grand

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4BHXO%2B45m%2B7T0q83rhWd34RPhwWf8fWdu%2BzgL_Yu96eQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
diff --git a/src/main/java/org/elasticsearch/common/util/UnsafeUtils.java b/src/main/java/org/elasticsearch/common/util/UnsafeUtils.java
index e8f7107..fefc088 100644
--- a/src/main/java/org/elasticsearch/common/util/UnsafeUtils.java
+++ b/src/main/java/org/elasticsearch/common/util/UnsafeUtils.java
@@ -72,6 +72,7 @@ public enum UnsafeUtils {
 
     /** Compare the two given {@link BytesRef}s for equality. */
     public static boolean equals(BytesRef b1, BytesRef b2) {
+        if (true) return b1.bytesEquals(b2);
         int len = b1.length;
         if (b2.length != len) {
             return false;

Reply via email to