Giter Site home page Giter Site logo

Comments (10)

mesirendon avatar mesirendon commented on July 28, 2024

+1
I've created the tweeter index to test and doing as the README says, I get the same error

from elasticsearch-action-updatebyquery.

comdiv avatar comdiv commented on July 28, 2024

+1

from elasticsearch-action-updatebyquery.

comdiv avatar comdiv commented on July 28, 2024

I have "fix" it by simple remove all things that uses contentUnsafe() - it works now on 1.6 but i think it's not much good....

from elasticsearch-action-updatebyquery.

igor-kupczynski avatar igor-kupczynski commented on July 28, 2024

+1 as I see the same on my dev box

NoSuchMethodError[org.elasticsearch.rest.RestRequest.contentUnsafe()Z]

@comdiv so this ctx._source.somevalue = 100 uses contentUnsafe()? How we can replace it with something else?

I see this ticket in ES itself https://github.com/elastic/elasticsearch-transport-memcached/issues/40 and the commit elastic/elasticsearch-transport-memcached@32415cc but there is no info on what we can use instead

from elasticsearch-action-updatebyquery.

comdiv avatar comdiv commented on July 28, 2024

That is patch

diff --git a/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java b/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java
index 7d6718d..a4288c5 100644
--- a/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java
+++ b/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java
@@ -97,12 +97,6 @@ public class ShardUpdateByQueryRequest extends ShardReplicationOperationRequest
         return bulkResponseOption;
     }

-    @Override
-    public void beforeLocalFork() {
-        if (sourceUnsafe) {
-            source = source.copyBytesArray();
-        }
-    }

     @Override
     public ActionRequestValidationException validate() {
diff --git a/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java b/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java
index 577ca93..fd42403 100644
--- a/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java
+++ b/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java
@@ -114,7 +114,6 @@ public class TransportShardUpdateByQueryAction extends TransportAction<ShardUpda
         }

         if (request.operationThreaded()) {
-            request.beforeLocalFork();
             threadPool.executor(ThreadPool.Names.BULK).execute(new Runnable() {

                 public void run() {
diff --git a/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java b/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java
index 1ddf630..55e43e1 100644
--- a/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java
+++ b/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java
@@ -87,7 +87,7 @@ public class RestUpdateByQueryAction extends BaseRestHandler {

         // see if we have it in the body
         if (request.hasContent()) {
-            udqRequest.source(request.content(), request.contentUnsafe());
+            udqRequest.source(request.content(), false);
         } else if (request.hasParam("source")) {
             udqRequest.source(new BytesArray(request.param("source")), false);
         } else if (request.hasParam("q")) {

And it works - maybe it work not "safe" but all groovy scripts are executed well

from elasticsearch-action-updatebyquery.

igor-kupczynski avatar igor-kupczynski commented on July 28, 2024

OK, thanks, I'll try with my tests and let you know

from elasticsearch-action-updatebyquery.

igor-kupczynski avatar igor-kupczynski commented on July 28, 2024

@comdiv @apeteri Thanks guys after applying pull request on my repo it works great.

We run some automated and manual tests against a dev cluster and we see no issues with update_by_query. I hope this pull request will get merged quickly.

from elasticsearch-action-updatebyquery.

redserpent7 avatar redserpent7 commented on July 28, 2024

Any updates on this? When should we expect the fix to be merged? ES is on 1.7.1 now

from elasticsearch-action-updatebyquery.

ofavre avatar ofavre commented on July 28, 2024

v2.6.0, supporting ES 1.6.x is not released and should be available within 2-4 hours.

from elasticsearch-action-updatebyquery.

ofavre avatar ofavre commented on July 28, 2024

v2.6.0 supports ES 1.7.1 as well.

from elasticsearch-action-updatebyquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.