Is there a documentation page that can help understand what are all the different values for the state field of Completed_Requests and the meaning of each?
I see 2 values: closed & timeout and completed. I guess completed means client received the response within the timeout period and hence it was a fully successful execution. How does one differentiate closed from timeout? And hence the above question.
Closed means client closed before server completed request
timeout means server not able to completed request before client requested time timeout value.
@Marco_Greco, can you help understand what do the other states mean or if there is a link in the documentation that can help understand the same.
Some of the statuses are only used internally, but roughly speaking the description is as follows:
- submitted: the request has been received by the query service, but all servicers are busy and it’s waiting to be processed
- running: it’s being processed
- success, errors, completed: the request completed all processing phases, from instantiating to execution. completed is used in system:completed_requests, success and errors are used in the result metrics.
- fatal: the request was parsed but could not be executed because of some terminal error (eg a keyspace was missing)
- closed: the client closed the port and the request was terminated
- timeout: the request exceeded the timeout and was terminated
- stopped: the dba explicitly terminated the request via a delete from system:active_requests
- aborted: there was a major internal error (such as a panic or assert failure) and the request was aborted.
More information about system keyspaces can be found in Monitor Queries | Couchbase Docs
More information about requests fields in Admin REST API | Couchbase Docs
I had gone through those documents but it did not have different states and their meanings, which you have now provided. I think it would be a good idea to cover it in the manuals.
Also, can you help understand when will the state be “closed”? lets say,
- I am running the query from QWB and after waiting a few seconds, if I hit the cancel button, will it show up as “Closed” in completed_requests?
- I am running the query from cbq and after waiting a few seconds, if I press ctrl+c, will it show up as “Closed” in completed_requests?
- I have started the application and it has executed the query via SDK and I dont let the execution complete but somehow stop the application, will it show up as “Closed” in completed_requests?
It all depends on how your clients operates.
For instance, QWB cancels requests it is running by deleting from system:active requests, so the state would show as stopped, conversely if you hit ^C on cbq, you are actually killing it, which closes the connection, so the state would show up as closed. The SDK would behave similarly if you killed it.