-
Notifications
You must be signed in to change notification settings - Fork 8
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
Prototype the deregister namespace functionality. #6
base: master
Are you sure you want to change the base?
Conversation
src/cm_stats_api.h
Outdated
/* Deregister and free a namespace. | ||
* Results are undefined if ns is still being used during or after this call | ||
* if the return value is true. | ||
* This function registers ns from parent within rec. If successful, ns is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*deregisters
This looks correct to me. |
* if the return value is true. | ||
* This function deregisters ns from parent within rec. If successful, ns is | ||
* freed. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about separating the deregister
from the free
? I'm thinking we could deregister a namespace as part of a tear-down process, then fold the statistics under that namespace into a namespace dedicated to historical data (accumulating all the stuff that had been torn down in the past), and then free. It also provides a mechanism to move metrics from one location to another, like if we wanted to have "in-progress" metrics retrievable, and then committed to a new place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would mean we have to expose the free call making the internal mechanics a bit more accessible. Given that you cannot be writing to this namespace when you deregister it (unsafe)... I think you could just merge the namespace into a new one then deregister w/ free as it is.
I'm not sure there is much advantage to giving that control. If you feel you need it, implement it and glue it into this PR.
No description provided.