MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luabb_trigger_unregister

Function luabb_trigger_unregister

lua/sp.c:446–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446static void luabb_trigger_unregister(Lua L, dbconsumer_t *q)
447{
448 if (q->lock) {
449 Pthread_mutex_lock(q->lock);
450 if (*q->status != TRIGGER_SUBSCRIPTION_CLOSED) {
451 bdb_trigger_unsubscribe(q->iq.usedb->handle);
452 }
453 Pthread_mutex_unlock(q->lock);
454 }
455 int retry = 10;
456 do {
457 int rc = trigger_unregister_req(&q->info);
458 if (rc == CDB2_TRIG_REQ_SUCCESS || rc == CDB2_TRIG_ASSIGNED_OTHER) return;
459 if (L) check_retry_conditions(L, &q->info, 1);
460 } while (--retry);
461}
462
463static int stop_waiting(Lua L, dbconsumer_t *q)
464{

Callers 2

dbconsumer_freeFunction · 0.85
force_unregisterFunction · 0.85

Calls 3

bdb_trigger_unsubscribeFunction · 0.85
trigger_unregister_reqFunction · 0.85
check_retry_conditionsFunction · 0.85

Tested by

no test coverage detected