Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get doc fails for some array fields #3000

Closed
dakrone opened this issue May 6, 2013 · 1 comment · Fixed by #3002
Closed

Get doc fails for some array fields #3000

dakrone opened this issue May 6, 2013 · 1 comment · Fixed by #3002

Comments

@dakrone
Copy link
Member

dakrone commented May 6, 2013

See the following two scripts to reproduce:
https://gist.github.com/dakrone/5528301
https://gist.github.com/dakrone/5528298

When run:

∴ ./broken-get.zsh 
{"ok":true,"acknowledged":true}{"ok":true,"acknowledged":true}
{"ok":true,"_index":"get-test","_type":"doc","_id":"1","_version":1}
{"ok":true,"_index":"get-test","_type":"doc","_id":"2","_version":1}
{
  "_index" : "get-test",
  "_type" : "doc",
  "_id" : "1",
  "_version" : 1,
  "exists" : true, "_source" : {"date":"2010-01-01"}
}
{
  "_index" : "get-test",
  "_type" : "doc",
  "_id" : "2",
  "_version" : 1,
  "exists" : true, "_source" : {"date":["2010-01-01","2011-01-01"]}
}
{
  "error" : "MapperParsingException[failed to parse date field [[2010-01-01, 2011-01-01]], tried both date format [yyyy-MM-dd], and timestamp number]; nested: IllegalArgumentException[Invalid format: \"[2010-01-01, 2011-01-01]\"]; ",
  "status" : 400
}

and:

∴ ./broken-get2.zsh 
{"ok":true,"acknowledged":true}{"ok":true,"acknowledged":true}
{"ok":true,"_index":"get-test","_type":"doc","_id":"1","_version":1}
{"ok":true,"_index":"get-test","_type":"doc","_id":"2","_version":1}
{
  "_index" : "get-test",
  "_type" : "doc",
  "_id" : "1",
  "_version" : 1,
  "exists" : true, "_source" : {"num":2}
}
{
  "_index" : "get-test",
  "_type" : "doc",
  "_id" : "2",
  "_version" : 1,
  "exists" : true, "_source" : {"num":[2,1]}
}
{
  "error" : "NumberFormatException[For input string: \"[2, 1]\"]",
  "status" : 500
}
@dakrone
Copy link
Member Author

dakrone commented May 6, 2013

Forgot to mention, this is on vanilla ES 0.90.0.

@ghost ghost assigned imotov May 7, 2013
@imotov imotov closed this as completed in 32abf6b May 7, 2013
imotov added a commit that referenced this issue May 7, 2013
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
martijnvg pushed a commit that referenced this issue Apr 25, 2018
Operations from a leader shard will be indexed into the engine with the
origin set to primary. The problem is here is that then we have primary
semantics in the engine such as assertions about sequence numbers being
unassigned, and we do not have correct semantics for out-of-order
delivery of operations (as we should on a following engine, whether or
not it is primary since the ordering is determined from the
leader). This commit handles this by always using the replica plan for
indexing into a following engine, whether or not the engine is for a
primary shard.

Relates #3000
jasontedor added a commit to jasontedor/elasticsearch that referenced this issue May 11, 2018
Operations from a leader shard will be indexed into the engine with the
origin set to primary. The problem is here is that then we have primary
semantics in the engine such as assertions about sequence numbers being
unassigned, and we do not have correct semantics for out-of-order
delivery of operations (as we should on a following engine, whether or
not it is primary since the ordering is determined from the
leader). This commit handles this by always using the replica plan for
indexing into a following engine, whether or not the engine is for a
primary shard.

Relates elastic#3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants