Bulk API returning create results for index operation in 2.3.1


(Da Tao) #1

Hi,

I just found a weird return result in ES 2.3.1. I sent the following request to bulk API:

{"index":{"_index":"slabtest-2016.12.23","_type":"etw"}}
{"EventId":0,"EventDate":"2016-12-23T18:28:41.8426958Z","Keywords":0,"ProviderId":"00000000-0000-0000-0000-000000000000","ProviderName":null,"InstanceName":"instance","Level":0,"LevelName":"LogAlways","Message":null,"Opcode":0,"Task":0,"Version":0,"ProcessId":0,"ThreadId":0,"Payload_msg":"1","Payload_date":"2016-12-23T18:28:41.8426958Z"}
{"index":{"_index":"slabtest-2016.12.23","_type":"etw"}}
{"EventId":0,"EventDate":"2016-12-23T18:28:41.8446948Z","Keywords":0,"ProviderId":"00000000-0000-0000-0000-000000000000","ProviderName":null,"InstanceName":"instance","Level":0,"LevelName":"LogAlways","Message":null,"Opcode":0,"Task":0,"Version":0,"ProcessId":0,"ThreadId":0,"Payload_msg":"2","Payload_date":"2016-12-23T18:28:41.8446948Z"}
{"index":{"_index":"slabtest-2016.12.23","_type":"etw"}}
{"EventId":0,"EventDate":"2016-12-23T18:28:41.8446948Z","Keywords":0,"ProviderId":"00000000-0000-0000-0000-000000000000","ProviderName":null,"InstanceName":"instance","Level":0,"LevelName":"LogAlways","Message":null,"Opcode":0,"Task":0,"Version":0,"ProcessId":0,"ThreadId":0,"Payload_msg":"3","Payload_date":"2016-12-23T18:28:41.8446948Z"}

I was expecting results of index operation, but I got results of create operation.
I have tested it on Cloud and a Windows single node, both are returning the same result. On Windows 5.0.2 and 5.1.1, the results are correct.

Is it a bug? How can I collect more info if needed?

Thanks.


(Nik Everett) #2

Without the output I can't really tell what you mean. If it is different in 5.0.2 and 5.1.1 then it might be a bug, but not a high enough priority one to backport to 2.x. Or just a difference between the two versions.


(Da Tao) #3

The bulk api request is 3 index operations:

{"index":{"_index":"slabtest-2016.12.27","_type":"etw"}}
{"EventId":0,"EventDate":"2016-12-27T14:18:12.7423148Z","Keywords":0,"ProviderId":"00000000-0000-0000-0000-000000000000","ProviderName":null,"InstanceName":"instance","Level":0,"LevelName":"LogAlways","Message":null,"Opcode":0,"Task":0,"Version":0,"ProcessId":0,"ThreadId":0,"Payload_msg":"1","Payload_date":"2016-12-27T14:18:12.7423148Z"}
{"index":{"_index":"slabtest-2016.12.27","_type":"etw"}}
{"EventId":0,"EventDate":"2016-12-27T14:18:12.7423148Z","Keywords":0,"ProviderId":"00000000-0000-0000-0000-000000000000","ProviderName":null,"InstanceName":"instance","Level":0,"LevelName":"LogAlways","Message":null,"Opcode":0,"Task":0,"Version":0,"ProcessId":0,"ThreadId":0,"Payload_msg":"2","Payload_date":"2016-12-27T14:18:12.7423148Z"}
{"index":{"_index":"slabtest-2016.12.27","_type":"etw"}}
{"EventId":0,"EventDate":"2016-12-27T14:18:12.7423148Z","Keywords":0,"ProviderId":"00000000-0000-0000-0000-000000000000","ProviderName":null,"InstanceName":"instance","Level":0,"LevelName":"LogAlways","Message":null,"Opcode":0,"Task":0,"Version":0,"ProcessId":0,"ThreadId":0,"Payload_msg":"3","Payload_date":"2016-12-27T14:18:12.7423148Z"}

Here are the result in 2.3.1:

{
    "took":1309,
    "errors":false,
    "items":[
        {
            "create":{
                "_index":"slabtest-2016.12.27",
                "_type":"etw",
                "_id":"AVlAmvxnpgQrdcZHT7Z4",
                "_version":1,
                "_shards":{
                    "total":2,
                    "successful":1,
                    "failed":0
                },
                "status":201
            }
        },
        {
            "create":{
                "_index":"slabtest-2016.12.27",
                "_type":"etw",
                "_id":"AVlAmvxnpgQrdcZHT7Z5",
                "_version":1,
                "_shards":{
                    "total":2,
                    "successful":1,
                    "failed":0
                },
                "status":201
            }
        },
        {
            "create":{
                "_index":"slabtest-2016.12.27",
                "_type":"etw",
                "_id":"AVlAmvxnpgQrdcZHT7Z6",
                "_version":1,
                "_shards":{
                    "total":2,
                    "successful":1,
                    "failed":0
                },
                "status":201
            }
        }
    ]
}

And here is the result in 5.0.2 and 5.1.1:

{
    "took":1405,
    "errors":false,
    "items":[
        {
            "index":{
                "_index":"slabtest-2016.12.27",
                "_type":"etw",
                "_id":"AVlApVP6d2ep14HstVjy",
                "_version":1,
                "result":"created",
                "_shards":{
                    "total":2,
                    "successful":1,
                    "failed":0
                },
                "created":true,
                "status":201
            }
        },
        {
            "index":{
                "_index":"slabtest-2016.12.27",
                "_type":"etw",
                "_id":"AVlApVP6d2ep14HstVjz",
                "_version":1,
                "result":"created",
                "_shards":{
                    "total":2,
                    "successful":1,
                    "failed":0
                },
                "created":true,
                "status":201
            }
        },
        {
            "index":{
                "_index":"slabtest-2016.12.27",
                "_type":"etw",
                "_id":"AVlApVP6d2ep14HstVj0",
                "_version":1,
                "result":"created",
                "_shards":{
                    "total":2,
                    "successful":1,
                    "failed":0
                },
                "created":true,
                "status":201
            }
        }
    ]
}

The ES reply in 2.3.1 is confusing. Why am I getting create instead of index ?


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.