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

CA-162029: Close FDs when deregistering an RRDD plugin #2175

Merged
merged 2 commits into from Feb 24, 2015

Conversation

simonjbeaumont
Copy link
Contributor

No description provided.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
@simonjbeaumont
Copy link
Contributor Author

If the file still exists, it would open and add it to the cache in the current implementation. However, in reality, the file won't exist any more because the plugin is deregistered. The call to read_file will fail with ENOENT and this is handled by the exception handling logic in read_stats and no fd will be created and therefore none leaked.

I'd put some more effort into making the semantics of this cache a bit cleaner but it has changed upstream to use a much cleaner interface: https://github.com/xapi-project/rrd-transport/blob/master/lib/rrd_reader.ml.

thomassa added a commit that referenced this pull request Feb 24, 2015
CA-162029: Close FDs when deregistering an RRDD plugin
@thomassa thomassa merged commit a21d63c into xapi-project:creedence-bugfix Feb 24, 2015
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.

None yet

2 participants