MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / invalidateReplState

Method invalidateReplState

src/jrd/Database.cpp:440–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438 }
439
440 void Database::invalidateReplState(thread_db* tdbb, bool broadcast)
441 {
442 SyncLockGuard guard(&dbb_repl_sync, SYNC_EXCLUSIVE, FB_FUNCTION);
443
444 dbb_repl_state.invalidate();
445
446 if (broadcast)
447 {
448 if (!dbb_repl_lock)
449 {
450 dbb_repl_lock = FB_NEW_RPT(*dbb_permanent, 0)
451 Lock(tdbb, 0, LCK_repl_state, this, replStateAst);
452 }
453
454 // Signal other processes about the changed state
455 if (dbb_repl_lock->lck_logical == LCK_none)
456 LCK_lock(tdbb, dbb_repl_lock, LCK_EX, LCK_WAIT);
457 else
458 LCK_convert(tdbb, dbb_repl_lock, LCK_EX, LCK_WAIT);
459 }
460
461 LCK_release(tdbb, dbb_repl_lock);
462 }
463
464 int Database::replStateAst(void* ast_object)
465 {

Callers 1

replStateAstMethod · 0.80

Calls 5

LCK_lockFunction · 0.85
LCK_convertFunction · 0.85
LCK_releaseFunction · 0.85
LockClass · 0.70
invalidateMethod · 0.45

Tested by

no test coverage detected