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

Rework comment handling #420

Merged
merged 6 commits into from
Jun 22, 2023
Merged

Rework comment handling #420

merged 6 commits into from
Jun 22, 2023

Commits on Mar 1, 2023

  1. - Use hasmap to find comment data

    Signed-off-by: nook24 <[email protected]>
    nook24 authored and sni committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    e5f8474 View commit details
    Browse the repository at this point in the history
  2. rework comment handling

    This PR reworks the comment handling to improve performance when having lots of comments.
    
      - it add a prev pointer to the comments list so we don't have to iterate over the complete list when removing an item
      - it replaces the hash lookup to quickly access comments for specific hosts/services in favor of a new host/service attribute which holds links to the comments
      - it avoids duplicate host/service lookups for DEL_ALL_HOST_COMMENTS/DEL_ALL_SVC_COMMENTS command
      - it removes hash functions which are now unused
    
    In general, it tries to adopt the downtime handling over to comments.
    
    This PR is based on naemon#375.
    
    Since the internal object structure changes, all NEB modules have to be rebuild. (We therefor increase CURRENT_NEB_API_VERSION to 6)
    
    Signed-off-by: Sven Nierlein <[email protected]>
    sni committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    1d5dfa0 View commit details
    Browse the repository at this point in the history
  3. add timeing point for number of downtimes/comments

    Signed-off-by: Sven Nierlein <[email protected]>
    sni committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    c18fa90 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2023

  1. fix typo in get_new_comment_id

    swapped id and type parameter. Also start ids at 1 like before.
    sni committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    370590c View commit details
    Browse the repository at this point in the history
  2. fix downtime test

    comment ids start at 1.
    sni committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    f45c2e1 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. remove comment_list

    it is not required anymore since we store comments in a hash table now.
    
    Signed-off-by: Sven Nierlein <[email protected]>
    sni committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    613a5b4 View commit details
    Browse the repository at this point in the history