Changeset 1e78a691ff7c7b4c7098d2c3869dccd0fbdc7248
- Timestamp:
- 11/23/11 00:00:34
(2 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1322006434 -0500
- git-parent:
[e8182656cf6fe72dd52cf42f5e1e7b34c8f6e10a]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1322006434 -0500
- Message:
fixups... and heartbeat during the initalization of the postgres stuff as it can take a while on large systems
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r7e10f7c |
r1e78a69 |
|
| 191 | 191 | strlcpy(hfile, path, sizeof(hfile)); |
|---|
| 192 | 192 | |
|---|
| 193 | | noitL(noit_error, " handoff -> %s\n", hfile); |
|---|
| | 193 | noitL(noit_debug, " handoff -> %s\n", hfile); |
|---|
| 194 | 194 | if(the_one_and_only) { |
|---|
| 195 | 195 | noit_http_session_ctx *ctx = the_one_and_only; |
|---|
| r7e10f7c |
r1e78a69 |
|
| 39 | 39 | #include "utils/noit_mkdir.h" |
|---|
| 40 | 40 | #include "utils/noit_getip.h" |
|---|
| | 41 | #include "utils/noit_watchdog.h" |
|---|
| 41 | 42 | #include "stratcon_datastore.h" |
|---|
| 42 | 43 | #include "stratcon_realtime_http.h" |
|---|
| … | … | |
| 1448 | 1449 | ij->cpool = get_conn_pool_for_remote(ij->remote_str, ij->remote_cn, |
|---|
| 1449 | 1450 | ij->fqdn); |
|---|
| 1450 | | noitL(noit_error, "ingesting payload: %s\n", ij->filename); |
|---|
| | 1451 | noitL(noit_debug, "ingesting payload: %s\n", ij->filename); |
|---|
| 1451 | 1452 | ingest = eventer_alloc(); |
|---|
| 1452 | 1453 | ingest->mask = EVENTER_ASYNCH; |
|---|
| … | … | |
| 1496 | 1497 | info->fqdn ? info->fqdn : "", info->dsn ? info->dsn : ""); |
|---|
| 1497 | 1498 | } |
|---|
| | 1499 | noit_watchdog_child_heartbeat(); |
|---|
| 1498 | 1500 | } |
|---|
| 1499 | 1501 | PQclear(d->res); |
|---|
| … | … | |
| 1559 | 1561 | info->fqdn ? info->fqdn : "", info->dsn ? info->dsn : ""); |
|---|
| 1560 | 1562 | } |
|---|
| | 1563 | noit_watchdog_child_heartbeat(); |
|---|
| 1561 | 1564 | } |
|---|
| 1562 | 1565 | PQclear(d->res); |
|---|
| … | … | |
| 1634 | 1637 | } |
|---|
| 1635 | 1638 | static int is_postgres_ingestor_file(const char *file) { |
|---|
| | 1639 | noit_watchdog_child_heartbeat(); |
|---|
| 1636 | 1640 | return (strlen(file) == 19 && !strcmp(file + 16, ".pg")); |
|---|
| 1637 | 1641 | } |
|---|
| 1638 | 1642 | static int postgres_ingestor_init(noit_module_generic_t *self) { |
|---|
| | 1643 | stratcon_datastore_core_init(); |
|---|
| 1639 | 1644 | pthread_mutex_init(&ds_conns_lock, NULL); |
|---|
| 1640 | 1645 | pthread_mutex_init(&storagenode_to_info_cache_lock, NULL); |
|---|