| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
Ingest is now background only, so don't limit where they're started
from. Adds some unfortunate locking around the curl maps.
|
| |
|
|
| |
This prevents halting reading input during data insertion.
|
| |
|
|
|
| |
Actual ingest is performed by the main process, jobReadParkedLines just
reads the park file and adds it to the queue.
|
| |
|
|
| |
Fixes issue where queuedLines would be accessed from background thread.
|
| |
|
|
| |
Allows safely running finalisation code in the main thread if required.
|
| | |
|
| |
|
|
|
|
|
| |
Limits the number lines inserted per transactions, and the number of
transactions before returning to reading input.
Prevents long running transactions in the case when queued lines has
grown in size.
|
| |
|
|
|
| |
Entity value is MD5 hashed same as DB unique key, but the id itself is
now taken from the DB primary key which is sequence generated.
|
| |
|
|
| |
Or the last errno on failure.
|
| |
|
|
| |
Also logs them on main loop exit.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Adds virtual log function, real implementation writes to syslog.
Test implementation writes to BOOST_TEST_MESSAGE, perf implementation
discards.
Replaces existing prints to stderr and adds logs to all key points.
|
| |
|
|
|
|
|
|
|
|
| |
Store log lines in memory until threshold is reach or idle occurs, then
insert all the lines in a single transaction. Save points handle the
case of insertion errors. On success the queue is cleared.
Parked lines also saved in bulk, only necessary if queued lines could
not be inserted on shutdown, else the queue simply grows until ability
to insert is restored. Importing parked lines just adds them to the
queue and the normal process then follows.
|
| |
|
|
|
| |
Apache sends SIGTERM to the logger process to it shutdown. Honestly I
thought it would just close stdin and I should have checked.
|
| |
|
|
|
| |
Easier checking if a job has completed [successfully] and reseting state
for the next time.
|
| |
|
|
|
| |
Neither the curl handle, not the operation map is thread safe. This
isn't ideal, but it does solve the problem in a safe manor.
|
| |
|
|
|
| |
Jobs run on background threads now, so we can happily run them even when
we're busy.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Replaces weird select with one thing with a function pointer stored in
the type definition array.
|
| |
|
|
|
|
|
| |
Don't persist entity ids saved to the DB until the transaction is
committed. Prevents the issue where a later DB operation fails, the
transaction is rolled back, but we still think the entity has been
saved.
|
| |
|
|
| |
Periodically, on idle, scan for and import previously parked lines.
|
| | |
|
| |
|
|
|
| |
We call this parking, later we can reattempt ingestion after whatever
caused the failure has been fixed.
|
| |
|
|
|
|
|
| |
Holds all the settings and their defaults for use in program_options and
tests. Disables missing-field-initializers in tests because its over
sensitive to structures with defaults where you only provide some values
specifically.
|
| |
|
|
| |
Diagnostics and the ability to ingest later.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Preparation step for having background curl operations.
|
| | |
|
| | |
|
| |
|
|
| |
If no new entities are required, no transaction is created.
|
| |
|
|
| |
Add visitSum for tuples and makes storeEntities into a single lambda.
|
| |
|
|
|
| |
This is an ever growing set, but in theory should be finite, and is only
4bytes per entity.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Store its Entity immediately for later use.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
zlib's crc32 used here, the interface is a bit C and as a result a bit
casty, but it'll work.
|
| |
|