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

Enh: implemented transparent update #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

geektophe
Copy link

This patch implements transparent update. It prevents downtimes or void results each time a new configuration is pushed.

The deleted objects state is saved when new initial Broks are sent by a scheduler. Queries get executed from this saved state until new objects are fully loaded. Once done, the old state is erased, and queries are made from latest objects state.

To enable transparent update, set the transparent_update parameter to 1 in the livestatus configuration:

define module {
    module_name        Livestatus
    module_type        livestatus
    port               50000
    ...
    transparent_update 1
    ...
}

Also:

  • Fixed a bug in itersorted bound method in regenerator class that crashed livestatus when a query was made during objects reloading. If an id could not be found, return a void list rather than crashing the whole module.
  • Set a null __itersorted__ method at initialization to avoid ugly object has no attribute '__itersorted__' exceptions when service starts.
  • Re-indented some (very) long and difficult to read list comprehensions

This patch implements transparent update. It prevents downtimes or void
results each time a new configuration is pushed.

The deleted objects state is saved when new initial Broks are sent by a
scheduler. Queries get executed from this saved state until new objects are
fully loaded. Once done, the old state is erased, and queries are made
from latest objects state.

To enable transparent update, set the `transparent_update` parameter to
`1` in the livestatus configuration:

    define module {
        module_name        Livestatus
        module_type        livestatus
        port               50000
        ...
        transparent_update 1
        ...
    }

Also:

- Fixed a bug in `itersorted` bound method in regenerator class that crashed
  livestatus when a query was made during objects reloading. If an id could
  not be found, return a void list rather than crashing the whole module.
- Set a null `__itersorted__` method at initialization to avoid ugly
  `object has no attribute '__itersorted__'` exceptions when service
  starts.
- Re-indented some (very) long and difficult to read list comprehensions
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.

1 participant