[jboss-jira] [JBoss JIRA] (WFCORE-910) Reading metrics with dots in their names blows up
Brian Stansberry (JIRA)
issues at jboss.org
Tue Aug 25 11:25:43 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101618#comment-13101618 ]
Brian Stansberry commented on WFCORE-910:
-----------------------------------------
Please do not include any automatic enforcement of 1) in the same PR as any other changes. It's something we may or may not do and should not block other things we definitely will do.
Statistics provided by unknown datasource and RA vendors may not comply and I do not want to reject them at this point unless we know we have to. Attributes provided by our own libs are a different matter; we can and should make them comply.
> Reading metrics with dots in their names blows up
> -------------------------------------------------
>
> Key: WFCORE-910
> URL: https://issues.jboss.org/browse/WFCORE-910
> Project: WildFly Core
> Issue Type: Feature Request
> Components: Domain Management
> Affects Versions: 2.0.0.Beta4
> Reporter: Kabir Khan
> Assignee: Tomaz Cerar
> Priority: Blocker
> Fix For: 2.0.0.Beta5
>
>
> When doing a :read-resource(include-runtime=true,recursive=true) this blows up. Debugging shows that to be because e.g. the resource /subsystem=jgroups/channel=ee/protocol=UDP contains metrics called things like
> {code}
> "timer.keep_alive_time" => {
> "type" => LONG,
> "description" => "Timeout in ms to remove idle threads from the timer pool",
> "expressions-allowed" => false,
> "nillable" => false,
> "access-type" => "metric",
> "storage" => "runtime"
> },
> "timer.max_threads" => {
> "type" => INT,
> "description" => "Max thread pool size for the timer thread pool",
> "expressions-allowed" => false,
> "nillable" => false,
> "access-type" => "metric",
> "storage" => "runtime"
> },
> "timer.min_threads" => {
> "type" => INT,
> "description" => "Minimum thread pool size for the timer thread pool",
> "expressions-allowed" => false,
> "nillable" => false,
> "access-type" => "metric",
> "storage" => "runtime"
> },
> {code}
> i.e. they have a dot in their name. So when the r-r handler wants to read the attributes it in effect tries to do the following demonstrated by CLI commands:
> {code}
> [standalone at localhost:9990 /] /subsystem=jgroups/channel=ee/protocol=UDP:read-attribute(name=timer
> timer.keep_alive_time timer.min_threads timer.rejection_policy timer.wheel_size timer_queue_size timer_threads
> timer.max_threads timer.queue_max_size timer.tick_time timer_class timer_tasks timer_type
> [standalone at localhost:9990 /] /subsystem=jgroups/channel=ee/protocol=UDP:read-attribute(name=timer.max_threads)
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0201: Unknown attribute 'timer'",
> "rolled-back" => true
> }
> {code}
> I see ReadResourceHandler has some stuff to extract the attribute name if 'extended syntax' is used. So we have two options:
> 1) Ban dots in metric/attribute names
> 2) Add a workaround to fall back. In other words if ReadAttributeHandler thinks extended syntax is being used, and cannot find the extracted 'timer' attribute, then try the full non-extracted name, e.g. timer.max_threads, and only then error.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list