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

Long type minimum value error #191165

Closed
bbaktaeho opened this issue Aug 23, 2024 · 3 comments
Closed

Long type minimum value error #191165

bbaktaeho opened this issue Aug 23, 2024 · 3 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@bbaktaeho
Copy link

bbaktaeho commented Aug 23, 2024

Kibana version:
8.9.0
Elasticsearch version:
8.9.0
Server OS version:

Browser version:

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):

Describe the bug:

An int64-type minimum value was stored in the index generated by the long type.
The expected value is -9223372036854775808, but when I checked the index, it was -9223372036854776000.
The value -9223372036854776000 is out of the range of long type.
image

Below is the mapping information.
image

Steps to reproduce:

PUT /test
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 1
  },
  "mappings": {
    "properties": {
      "value": {
        "type": "long"
      }
    }
  }
}

POST test/_doc/test-id
{
  "value": -9223372036854775808
}

GET test/_search

Expected behavior:

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@bbaktaeho bbaktaeho added the bug Fixes for quality problems that affect the customer experience label Aug 23, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 23, 2024
@rudolf
Copy link
Contributor

rudolf commented Aug 26, 2024

@bbaktaeho Thanks for raising this issue, it appears to be a problem with the console app in Kibana.

If I use curl to execute those same commands against Elasticsearch I get the expected value:

curl -XPUT "http://elastic:changeme@localhost:9200/test" -H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'              
{
  "settings": {                
    "number_of_shards": 1,
    "number_of_replicas": 1
  },
  "mappings": {
    "properties": {
      "value": {
        "type": "long"
      }
    }
  }
}'

curl -XPOST "http://elastic:changeme@localhost:9200/test/test-id" -H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'            
{
  "value": -9223372036854775808
}'

curl -XPOST "http://elastic:changeme@localhost:9200/test/_search?pretty=true" -H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
{
}'                             
{
  "took" : 2,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "test",
        "_id" : "test-id",
        "_score" : 1.0,
        "_source" : {
          "value" : -9223372036854775808
        }
      }
    ]
  }
}

@rudolf rudolf added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Aug 26, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 26, 2024
@alisonelizabeth
Copy link
Contributor

This looks related to #40183. I'm going to close in favor of that issue, but feel free to reopen if there is something I missed.

@alisonelizabeth alisonelizabeth closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

4 participants