pcp
[Top] [All Lists]

Re: [pcp] Duplicate Names in the PMNS - seeking consensus

To: Mark Goodwin <mgoodwin@xxxxxxxxxx>, PCP <pcp@xxxxxxxxxxx>
Subject: Re: [pcp] Duplicate Names in the PMNS - seeking consensus
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon, 19 Jan 2015 14:15:09 +1100
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <54BC4A6F.1070105@xxxxxxxxxx>
References: <54BA00E9.7050504@xxxxxxxxxxxxxxxx> <54BC4A6F.1070105@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
On 19/01/15 11:06, Mark Goodwin wrote:
On 01/17/2015 05:27 PM, Ken McDonell wrote:
[...]
This does not work at all "as is".  It can be made to work, but that
involves
changing scores of source files ... the result is an ugly hack hiding
a git
branch and I'm not going to commit that to the dev branch.

On reflection, I think there are 2 alternatives:

1. change the default behaviour to allow duplicates and strip out all
the "no
duplicates" stuff, or

2. drop all pretence at supporting duplicate names and rip out the
associated
non-working stuff.

Thoughts?

I think it'd be good generally, ...

Is that a vote for 1.?

... and from the back compat viewpoint,
e.g. following namespace migrations and PMDA pmns updates, etc. But
how would pmTraversePMNS() work? What other problems are there?

There are no real problems. The PMNS is still a tree. Just that some of the leaf nodes are labelled with the same PMID.

- no changes at all to pmTraversePMNS() or pmLookupName()
- pmNameID() would return one name (man page already describes non-determinism if PMNS contains duplicates) - pmNameAll() would return all of the names ... and I'd change PCP apps that currently use pmNameID() to use pmNameAll() and report all names for a given PMID

The only change would be that if a PMDA implementor used the same PMID twice by mistake, this would not be detected when the PMDA is installed, but would have to be debugged when you ask for metric A and get answers back for metric B, ask for metric B and get answers back for metric B.

<Prev in Thread] Current Thread [Next in Thread>