You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/07/11 16:42:27 UTC

[GitHub] [apisix] moecasts opened a new issue, #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

moecasts opened a new issue, #7438:
URL: https://github.com/apache/apisix/issues/7438

   ### Current Behavior
   
   ## Request
   ```sh
   $ curl -i http://127.0.0.1:9080/v1/users/\?id\=1234567890123456123
   HTTP/1.1 404 Not Found
   Date: Mon, 11 Jul 2022 16:26:29 GMT
   Content-Type: application/json
   Content-Length: 0
   Connection: keep-alive
   grpc-status: 5
   grpc-message: user not found
   grpc-status-details-bin: CAUSDnVzZXIgbm90IGZvdW5kGjwKKHR5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLnJwYy5FcnJvckluZm8SEAoOVVNFUl9OT1RfRk9VTkQ
   Server: APISIX/2.14.1
   Trailer: grpc-status
   Trailer: grpc-message
   ```
   
   ## Get
   ```
   SELECT * FROM "users" WHERE id = 1234567890123456000 AND "users"."deleted_at" IS NULL ORDER BY "users"."id" LIMIT 1
   ```
   
   ### Expected Behavior
   
   data precision should not loss
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   1. Run APISIX via the Docker image.
   2. Create a Route using grpc-transcode with uint64 proto
   3. Curl the route
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.14.1
   - Operating system (run `uname -a`): docker image: apache/apisix:2.14.1-alpine
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):  openresty/1.19.9.1
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): 3.4.0
   - APISIX Dashboard version, if relevant:  docker image: apache/apisix-dashboard:2.13-alpine
   - Plugin runner version, for issues related to plugin runners: 
   - LuaRocks version, for installation issues (run `luarocks --version`): 3.8.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] moecasts commented on issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by GitBox <gi...@apache.org>.
moecasts commented on issue #7438:
URL: https://github.com/apache/apisix/issues/7438#issuecomment-1181376793

   > @moecasts你能给出重现步骤吗?此外,[proto 选项](https://apisix.apache.org/docs/apisix/plugins/grpc-transcode/#options-for-pb_option)可能对您有用。
   
   `pb_option` 没用,重现的话,随便创建一个带 `uint64` 的请求,即可复现


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander commented on issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7438:
URL: https://github.com/apache/apisix/issues/7438#issuecomment-1181375309

   LuaJIT doesn't have good int64 support.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] moecasts commented on issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by GitBox <gi...@apache.org>.
moecasts commented on issue #7438:
URL: https://github.com/apache/apisix/issues/7438#issuecomment-1181394621

   > LuaJIT doesn't have good int64 support.
   
   So, is I only can use http  proxy if using `uint64`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander commented on issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7438:
URL: https://github.com/apache/apisix/issues/7438#issuecomment-1182802975

   https://apisix.apache.org/docs/apisix/plugins/grpc-transcode/#options-for-pb_option
   The `int64_as_string` option can be used to encode int64 as `#123...` and the client needs to convert it from string to real int64. Not a perfect solution but a workaround.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7438:
URL: https://github.com/apache/apisix/issues/7438#issuecomment-1611128710

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7438:
URL: https://github.com/apache/apisix/issues/7438#issuecomment-1181197928

   @moecasts Could you give the reproduce steps? Also, the [proto options](https://apisix.apache.org/docs/apisix/plugins/grpc-transcode/#options-for-pb_option) might be useful for you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7438:
URL: https://github.com/apache/apisix/issues/7438#issuecomment-1633946349

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] closed issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7438: bug: the problem of data precision loss when grpc transcode has Uint64 type in request data
URL: https://github.com/apache/apisix/issues/7438


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org