You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "wjxiz1992 (via GitHub)" <gi...@apache.org> on 2023/04/19 01:43:59 UTC
[GitHub] [kyuubi] wjxiz1992 opened a new issue, #4732: [Bug] some Operation REST API is not idempotent
wjxiz1992 opened a new issue, #4732:
URL: https://github.com/apache/kyuubi/issues/4732
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
### Describe the bug
when calling REST API GET `/api/v1/operations/<operation-handle>/rowset`, the first call will return me the correct and expected results. But when I call it the second time, it will still return with http status code 200, but the result turns to be
```
{
"rows": [],
"rowCount": 0
}
```
The same condition applies to `/log` . Is this expected? I felt we should return consistent value when using GET API.
### Affects Version(s)
1.7.0
### Kyuubi Server Log Output
_No response_
### Kyuubi Engine Log Output
_No response_
### Kyuubi Server Configurations
_No response_
### Kyuubi Engine Configurations
_No response_
### Additional context
The kyuubi service is deployed in k8s. the service type is NodePort. We have only 1 Kyuubi pod(instance).
### Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [X] No. I cannot submit a PR at this 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@kyuubi.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] github-actions[bot] commented on issue #4732: [Bug] some Operation REST API is not idempotent
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4732:
URL: https://github.com/apache/kyuubi/issues/4732#issuecomment-1514017471
Hello @wjxiz1992,
Thanks for finding the time to report the issue!
We really appreciate the community's efforts to improve Apache Kyuubi.
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] huangzhir commented on issue #4732: [Bug] some Operation REST API is not idempotent
Posted by "huangzhir (via GitHub)" <gi...@apache.org>.
huangzhir commented on issue #4732:
URL: https://github.com/apache/kyuubi/issues/4732#issuecomment-1518232616
I don't think this is a bug. This API retrieves the result of operationHandle, and the default fetchOrientation is FETCH_NEXT, which continuously retrieves the next maxRows of data.
https://github.com/apache/kyuubi/blob/26581f4a24aa043b6c7a450733afd6e996a50913/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala#L169
fetchOrientation has three values, FETCH_NEXT, FETCH_PRIOR, FETCH_FIRST. If you want to keep returning the maxRows-th data, the parameter of fetchOrientation can be configured as FETCH_FIRST.
https://github.com/apache/kyuubi/blob/26581f4a24aa043b6c7a450733afd6e996a50913/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala#L244
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] wjxiz1992 commented on issue #4732: [Bug] some Operation REST API is not idempotent
Posted by "wjxiz1992 (via GitHub)" <gi...@apache.org>.
wjxiz1992 commented on issue #4732:
URL: https://github.com/apache/kyuubi/issues/4732#issuecomment-1521097964
@huangzhir I see, thanks for the information!
How about the `/log` one? I noticed it's `NEXT` by default and cannot be modified? https://github.com/apache/kyuubi/blob/26581f4a24aa043b6c7a450733afd6e996a50913/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala#L148
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] huangzhir commented on issue #4732: [Bug] some Operation REST API is not idempotent
Posted by "huangzhir (via GitHub)" <gi...@apache.org>.
huangzhir commented on issue #4732:
URL: https://github.com/apache/kyuubi/issues/4732#issuecomment-1541613778
> But for the `/log` api, it works as expected, every time I sent http request, it will gives me latest log info,(only the latest log info since my previous api call)
This is indeed a problem and a missing feature. The "/log" interface does not have an "operationHandle" parameter like the "/rowset" interface, which means it can only provide the latest log entry.
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] ulysses-you closed issue #4732: [Bug] some Operation REST API is not idempotent
Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you closed issue #4732: [Bug] some Operation REST API is not idempotent
URL: https://github.com/apache/kyuubi/issues/4732
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] huangzhir commented on issue #4732: [Bug] some Operation REST API is not idempotent
Posted by "huangzhir (via GitHub)" <gi...@apache.org>.
huangzhir commented on issue #4732:
URL: https://github.com/apache/kyuubi/issues/4732#issuecomment-1541599127
> Then I try to fetch the rowset, but it always returns 404 error code: `Error getting result row set for operation handle a968d5bd-0ee5-4d85-824a-687cbb3e478e`
> I sent a piece of code as below
>
> ```
> import time
> while True:
> print("a")
> time.sleep(1)
> ```
>
> in mode ` "runAsync": "true"` Then I try to fetch the rowset, but it always returns 404 error code: `Error getting result row set for operation handle a968d5bd-0ee5-4d85-824a-687cbb3e478e`
This is because your code contains an infinite loop, which means it will not produce any results. Therefore, there is no rowset result.
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] wjxiz1992 commented on issue #4732: [Bug] some Operation REST API is not idempotent
Posted by "wjxiz1992 (via GitHub)" <gi...@apache.org>.
wjxiz1992 commented on issue #4732:
URL: https://github.com/apache/kyuubi/issues/4732#issuecomment-1522688993
Found another interesting scenario when I try to test the FETCH_NEXT case
I sent a piece of code as below
```
import time
while True:
print("a")
time.sleep(1)
```
in mode ` "runAsync": "true"`
Then I try to fetch the rowset, but it always returns 404 error code: `Error getting result row set for operation handle a968d5bd-0ee5-4d85-824a-687cbb3e478e`
But for the `/log` api, it works as expected, every time I sent http request, it will gives me latest log info,(only the latest log info since my previous api call)
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org