| To: | David Smith <dsmith@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [pcp] [RFC] pcp python patch |
| From: | Nathan Scott <nathans@xxxxxxxxxx> |
| Date: | Mon, 17 Nov 2014 01:28:59 -0500 (EST) |
| Cc: | pcp <pcp@xxxxxxxxxxx> |
| Delivered-to: | pcp@xxxxxxxxxxx |
| In-reply-to: | <54667179.1060605@xxxxxxxxxx> |
| References: | <54512E80.9090302@xxxxxxxxxx> <1832581184.7889066.1415166007440.JavaMail.zimbra@xxxxxxxxxx> <545A53B0.9030500@xxxxxxxxxx> <704052736.8837998.1415255680009.JavaMail.zimbra@xxxxxxxxxx> <545CEE9A.5060007@xxxxxxxxxx> <615631257.11639679.1415673601327.JavaMail.zimbra@xxxxxxxxxx> <54667179.1060605@xxxxxxxxxx> |
| Reply-to: | Nathan Scott <nathans@xxxxxxxxxx> |
| Thread-index: | zlfFpJNJmaEJWiSONDYGhZBaqyXIrA== |
| Thread-topic: | pcp python patch |
----- Original Message ----- > [...] > So, commit b2e3b5c in the pcpfans.git dsmith/dev branch does things as I > discussed above. That dramatically simplifies the changes to pmda.py (1) > and the refresh_metrics wrapper in pmda.py goes completely away. Nice. > (1) Except for one thing. I about went nuts with one problem. So we > stashed list/dictionary references down in cpmda. I'd update the > list/dictionaries in pmda.py and would see newly added metric info, but > if I cleared the metrics, I'd still get the old values. I finally > figured out the difference between 'dict = []' and 'dict.clear()'. The > former assigns a new empty dictionary while the latter clears out the > current dictionary. At the pmda.py level there really isn't any > difference, but the caused problems for cpmda which had a stashed > reference to the original dictionary, not the new one. Argh! Good find. Do we need a new API to allow new dictionary object ref(s) to be pushed down to cpmda, overwriting the old? cheers. -- Nathan |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | My first PMDA, some questions.., Jan-Frode Myklebust |
|---|---|
| Next by Date: | Re: [pcp] My first PMDA, some questions.., Nathan Scott |
| Previous by Thread: | Re: [pcp] [RFC] pcp python patch, David Smith |
| Next by Thread: | Re: [pcp] [RFC] pcp python patch, David Smith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |