Skip to content

Bulk containing updates on the same document ~30x slower on es 5.0.0 #21460

@TrustNoOne

Description

@TrustNoOne

Environment:
Elasticsearch 5.0.0: vanilla, single node, fresh install, no custom configuration or plugins

JVM version: 1.8.0_74

OS version: tried on mac os and linux

Description of the problem including expected versus actual behavior:
The same exact bulk containing 1 index request and 1000 updates of the same document takes ~500-700ms (on my hardware) on es 2.4 and ~12-15s on es 5.0.0. I tried on a linux machine and get the same result.
Tried transport client as well, no difference.

Am I missing something?

Steps to reproduce:

  1. create a simple mapping with a single field (I tried long and keyword, same thing) on both es 2.4 and 5.0
  2. create a bulk containing one index request for a document and 1000 different updates for the same document
  3. run the bulk query on es 2.4 and 5.0.

Bulk request Example
message is a long field in this example, but I've tried keyword/string not analyzed as well

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "message" : 0 }
{ "update" : {"_id" : "1", "_type" : "tweet", "_index" : "twitter"} }
{ "doc" : {"message" : 1} }
{ "update" : {"_id" : "1", "_type" : "tweet", "_index" : "twitter"} }
{ "doc" : {"message" : 2} }
{ "update" : {"_id" : "1", "_type" : "tweet", "_index" : "twitter"} }
{ "doc" : {"message" : 3} }
{ "update" : {"_id" : "1", "_type" : "tweet", "_index" : "twitter"} }
{ "doc" : {"message" : 4} }
...
{ "update" : {"_id" : "1", "_type" : "tweet", "_index" : "twitter"} }
{ "doc" : {"message" : 1000} }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions