Skip to content

[Doris On Es] Fix assertion failure when docvalue fields is gone#6874

Closed
dh-cloud wants to merge 1 commit intoapache:masterfrom
dh-cloud:patch_es_fields
Closed

[Doris On Es] Fix assertion failure when docvalue fields is gone#6874
dh-cloud wants to merge 1 commit intoapache:masterfrom
dh-cloud:patch_es_fields

Conversation

@dh-cloud
Copy link
Copy Markdown
Contributor

See test case below:

# curl -H "Content-Type: application/json" -XPUT http://10.35.25.164:9222/test_dd?pretty -d '
{
   "mappings": {
      "_doc": {
         "properties": {
            "k1": {
               "type": "long"
            }
         }
      }
   }
}'

# curl -H "Content-Type: application/json" -XPUT http://10.35.25.164:9222/test_dd/_doc/1?pretty -d '{}'

In DEBUG build mode, if we read the es index, RAPIDJSON_ASSERT
will be triggered because hits.hits.fields does not exist.

# curl -H "Content-Type: application/json" -XPOST '10.35.25.164:9222/test_dd/_doc/_search?filter_path=_scroll_id,hits.total,hits.hits._score,hits.hits.fields&pretty' -d '{"query":{"match_all":{}},"stored_fields":"_none_","docvalue_fields":["k1"]}'
{
  "hits" : {
    "total" : 1,
    "hits" : [
      {
        "_score" : null
      }
    ]
  }
}

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)
  • Optimization. Including functional usability improvements and performance improvements.
  • Dependency. Such as changes related to third-party components.
  • Other.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

See test case below:

```json
# curl -H "Content-Type: application/json" -XPUT http://10.35.25.164:9222/test_dd?pretty -d '
{
   "mappings": {
      "_doc": {
         "properties": {
            "k1": {
               "type": "long"
            }
         }
      }
   }
}'

# curl -H "Content-Type: application/json" -XPUT http://10.35.25.164:9222/test_dd/_doc/1?pretty -d '{}'

```

In DEBUG build mode, if we read the es index, RAPIDJSON_ASSERT
will be triggered because `hits.hits.fields` does not exist.

```
# curl -H "Content-Type: application/json" -XPOST '10.35.25.164:9222/test_dd/_doc/_search?filter_path=_scroll_id,hits.total,hits.hits._score,hits.hits.fields&pretty' -d '{"query":{"match_all":{}},"stored_fields":"_none_","docvalue_fields":["k1"]}'
{
  "hits" : {
    "total" : 1,
    "hits" : [
      {
        "_score" : null
      }
    ]
  }
}
```
@morningman morningman added the area/doris-on-es Issues or PRs related to Doris on ElasticSearch label Oct 19, 2021
@jackwener
Copy link
Copy Markdown
Member

This PR has not been updated for a long time.

There could be many reasons.

If it's caused by there are no maintainers to push or ignore this PR, I'm sorry.

If you contact maintainer or want to continue this PR, feel free to @me or @other maintainers.

@jackwener jackwener closed this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/doris-on-es Issues or PRs related to Doris on ElasticSearch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants