-
Notifications
You must be signed in to change notification settings - Fork 43
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
feedback: Submodule box.stat #851
Comments
I had assumed the following questions. Does it apply only to iproto requests or for console commands / application logic / background fibers too? Does 'resulted in an error' mean IPROTO_ERROR responses? Or it applies to errors that are catched by pcall / xpcall too (they do not lead to IPROTO_ERROR response)? I don't sure, but as I see it is counted in an error constructor for some error types. It does not matter whether it leads to an IPROTO_ERROR response or whether it was pcalled. It does not matter whether it caused by an iproto request, from console or from an application code. We need to understand what is the exact list of errors, which are counted here. And verify my observations above. |
* Alexander Turenko <[email protected]> [19/08/14 01:53]:
Reopened #851.
these are exceptions, all exceptions, whenever we create a new
struct error we ++ ERRORS.
…--
Konstantin Osipov, Moscow, Russia
|
Sure, I can verify what Mr Turenko says and am sure Mr Osipov is right. From that I see that: So I can say that: |
In brief: I think we should be as precise here as we can to make the statistics box.stat().ERROR is increased when a ClientError or its key_def = require('key_def')
box.cfg{}
box.stat().ERROR -- total: 0
key_def.new({{fieldno = 1, type = 'integer', collation_id = 1024}})
---
- error: 'Wrong index options (field 1): collation was not found by ID'
...
box.stat().ERROR -- total: 1 Also box functions can raise usual Lua text errors. Example: box.cfg{}
ffi = require('ffi')
box.stat().ERROR -- total: 0
box.tuple.new(ffi.new('char *'))
---
- error: unsupported Lua type 'cdata'
...
box.stat().ERROR -- total: 0 Or, say, key_def, which is part of box, can raise IllegalParams, which does not box.cfg{}
key_def = require('key_def')
box.stat().ERROR -- total: 0
---
- error: fieldno must not be nil
...
box.stat().ERROR -- total: 0 Calling an undefined Lua function is counted in the statistics as on a server box.cfg{listen=3301}
box.schema.user.grant('guest','read,write,execute','universe')
net_box = require('net.box')
c = net_box.connect('localhost:3301')
box.stat().ERROR -- total: 0
c:call('foo')
---
- error: Procedure 'foo' is not defined
...
box.stat().ERROR -- total: 2 However It seems we can say that box.stat().ERROR counts box errors, but it will not
My point here is that a user should understand what is going on to use a Just for the record, a list of error types in tarantool: List of ClientErrors:
List of errors that are not a ClientError inheritors:
|
OK, imagine you did document it precisely. What happens when you change the implementation? Do you think Tarantool will need to stick with the above forever now? box.stast.error purpose is to reflect exceptions during iproto query execution. If there are too many exceptions,then something goes wrong. It's an aggregated metric. Usually it does not grow. |
Okay, my point was that it is less usable when a user need experimenting to understand what is going on. Now I also think that something goes wrong in tarantool if we need to describe a feature in this way.
So why it does not do exaclty so (count iproto error responses)? Many apps has background fibers, net.box requests, administration tools (at least console), pcalled box requests and they can affect this metric. I filed the issue after a customer question (they observed some non-zero values here), so I guess I'm not only person who wonder what is this metric. |
If you think that "something is wrong in Tarantool if we need to describe a feature in this way", then do you mean that this is really a bug in the implementation, not a bug in the documentation? |
I'll try to collect more thoughts on that in developers mailing list. Update: Sent 'RFC: How to count box.stat().ERROR?' email. |
@Toktonada: The RFC on the developers mailing list did not result in a major change, did it? Our manual still says: "ERROR" is the count of requests that resulted in an error. I can change to your more precise description above, that is, the words "The following errors are counted" etc. Or I can do nothing. |
The discussion is stalled. It seems that it is unclear what is better to do in tarantool in the short run and in the future. So it would be not productive to assume that we'll change something soon in tarantool. Re documentation: It seems we're unable to actually document this feature, because of its implementation. So any description is okay. This issue can be closed, I think. NB: Personally I think it would be good to count iproto error responses (simpler way) or those responses per error code. I'll not do anything here for now, but if we'll find a demand (say, some amount of questions from users), I'll raise a question (discussion / issue) against tarantool itself rather then documentation. |
Okay, thanks for the full explanation. I'll close this. |
I think the 'RFC: How to count box.stat().ERROR?' discussion can be shared here. Alexander Turenkobox.stat().ERROR counts different kinds of error, let me cite the issue
However Kostya O. says:
I think that the current way to count errors statistics does not give The intention of this email is to collect thoughts whether we need to I see the following ways to provide more helphul information:
Maybe we need all of that in some way. I would appreciate any feedback. The discussion was originally started here: Please, look into the issue for more background information. WBR, Alexander Turenko. Konstantin Osipov* Alexander Turenko [email protected] [19/08/20 12:38]:
True.
Sure we do.
No. We need more fundamental mechanisms than that. By splitting some metric across a single dimension you don't take There are the following dimensions in which you reason about
You may want to look at each metric from each or a combination of So please stop reasoning about any particular metric. If you want Then we can come up with an implementation plan. -- Alexander TurenkoOkay, there are much more powerful ways to collect metrics. Should it I think it worth to add error metrics per error code: it is simple to WBR, Alexander Turenko. |
https://www.tarantool.io/en/doc/1.10/book/box/box_stat/
What does 'ERROR' field means? I don't find any description about that on this page.
The text was updated successfully, but these errors were encountered: