Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

postwait
Copy link
Member

@postwait postwait commented May 7, 2017

No description provided.

@postwait postwait assigned aidancully and unassigned aidancully May 8, 2017
@postwait postwait self-assigned this May 8, 2017
/* 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*deregisters

@rileyberton
Copy link

This looks correct to me.

* if the return value is true.
* This function deregisters ns from parent within rec. If successful, ns is
* freed.
*/

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?

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants