Bug 271 - Add health check: Periodic comparison of in-memory config against database
Summary: Add health check: Periodic comparison of in-memory config against database
Status: ASSIGNED
Alias: None
Product: Slony-I
Classification: Unclassified
Component: slon (show other bugs)
Version: devel
Hardware: All All
: low enhancement
Assignee: Jan Wieck
URL:
Depends on:
Blocks:
 
Reported: 2012-06-27 12:26 UTC by Christopher Browne
Modified: 2012-07-11 12:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Browne 2012-06-27 12:26:37 UTC
Occasionally, problems seem to arise where the slon's configuration in-memory falls out of sync with what is stored in the DB.

Thought: As part of the maintenance thread, validate that they are the same.

If any difference is found, dump the in-memory config and the DB config to logs, at some form of debug level.  (Possibly warning?)  If they are the same, indicate that they agree.

Need to check such things as:
- Node list (sl_node)
- Paths (sl_path)
- Subscriptions (sl_subscribe)
Comment 1 Christopher Browne 2012-06-28 14:34:03 UTC
I'm noticing that only the local node's share of sl_path is loaded in, so the data relevant to that is a combination of sl_node+sl_path data.

Branch set up to track this:

https://github.com/cbbrowne/slony1-engine/tree/bug271

Here is a patch which does the compare of sl_node+sl_path to the rtcfg_node structure:

https://github.com/cbbrowne/slony1-engine/commit/34dedfc04c664dbb48f9c7cc0e7e5e18c43e75f3
Comment 2 Christopher Browne 2012-06-29 10:52:50 UTC
Augmenting with sl_set/sl_subscribe data:

https://github.com/cbbrowne/slony1-engine/commit/c95c6640a5a7a0a5cd52bb7eb0d79eb46c6953e4