fleet/server/pubsub
Zachary Wasserman 39ebd81dc5 Close orphaned distributed query campaign after failed publish attempt (#707)
A distributed query campaign can be "orphaned" (left in the QueryRunning state)
if the Kolide server restarts while it is running, or other weirdness occurs.
When this happens, no subscribers are waiting to read results written by
osqueryd agents, but the agents continue to receive the query. Previously, this
would cause us to error on ingestion.

The new behavior will instead set the campaign to completed when it detects
that it is orphaned. This should prevent sending queries for which there is no
subscriber.

- New NoSubscriber error interface in pubsub
- Detect NoSubscriber errors and close campaigns
- Tests on pubsub and service methods

Fixes #695
2016-12-27 10:35:19 -05:00
..
doc.go Close orphaned distributed query campaign after failed publish attempt (#707) 2016-12-27 10:35:19 -05:00
inmem_query_results.go Close orphaned distributed query campaign after failed publish attempt (#707) 2016-12-27 10:35:19 -05:00
query_results_test.go Close orphaned distributed query campaign after failed publish attempt (#707) 2016-12-27 10:35:19 -05:00
redis_query_results.go Close orphaned distributed query campaign after failed publish attempt (#707) 2016-12-27 10:35:19 -05:00