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

Improve delete event #696

Merged
merged 5 commits into from
Feb 9, 2015
Merged

Improve delete event #696

merged 5 commits into from
Feb 9, 2015

Conversation

connortechnology
Copy link
Member

I noticed that deleting an event globbed the entire event structure under a monitor. That made for some pretty bad performance on my systems with a lot of events.

This converts the deleteEvent function to handle an event hash or an eid and use the StartTime value to figure out which day the event happened and so we only glob that day which drastically reduces filesystem hits.

load the relevant event data if passed an eid.
Use the StartTime to get to the event files instead of globbing the entire events path under the monitor.
@connortechnology
Copy link
Member Author

Don't merge yet, it has a problem.

@connortechnology
Copy link
Member Author

should be ok now

@knight-of-ni
Copy link
Member

Looks good to me.
If I understand this correctly, this pr will only make a difference if FAST_DELETE is off?

Obviously, if FAST_DELETE is on, we are letting the zmaudit daemon do the deleting.... but do we know if zmaudit has similar code that could also be improved in the same manner?

knight-of-ni pushed a commit that referenced this pull request Feb 9, 2015
@knight-of-ni knight-of-ni merged commit 8657d0a into master Feb 9, 2015
@connortechnology
Copy link
Member Author

correct, I havn't looked at zmaudit yet. I've just been auditing the web code trying to fix sluggishness.

@connortechnology connortechnology deleted the improve_deleteEvent branch February 9, 2015 14:24
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.

2 participants