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

Function CCH_get_related

src/jrd/cch.cpp:1394–1430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1392
1393
1394void CCH_get_related(thread_db* tdbb, PageNumber page, PagesArray &lowPages)
1395{
1396/**************************************
1397 *
1398 * C C H _ g e t _ r e l a t e d
1399 *
1400 **************************************
1401 *
1402 * Functional description
1403 * Collect all pages, dependent on given page (i.e. all pages which must be
1404 * written after given page). To do it, walk low part of precedence graph
1405 * starting from given page and put its numbers into array.
1406 *
1407 **************************************/
1408
1409 Database* dbb = tdbb->getDatabase();
1410 BufferControl* bcb = dbb->dbb_bcb;
1411
1412#ifndef HASH_USE_CDS_LIST
1413 Sync bcbSync(&bcb->bcb_syncObject, "CCH_get_related");
1414 bcbSync.lock(SYNC_SHARED);
1415#endif
1416
1417 BufferDesc* bdb = bcb->bcb_hashTable->find(page);
1418#ifndef HASH_USE_CDS_LIST
1419 bcbSync.unlock();
1420#endif
1421
1422 if (bdb)
1423 {
1424 Sync precSync(&bcb->bcb_syncPrecedence, "CCH_get_related");
1425 precSync.lock(SYNC_EXCLUSIVE);
1426
1427 const ULONG mark = get_prec_walk_mark(bcb);
1428 get_related(bdb, lowPages, PRE_SEARCH_LIMIT, mark);
1429 }
1430}
1431
1432
1433pag* CCH_handoff(thread_db* tdbb, WIN* window, ULONG page, int lock, SCHAR page_type,

Callers

nothing calls this directly

Calls 6

get_prec_walk_markFunction · 0.85
get_relatedFunction · 0.85
getDatabaseMethod · 0.80
lockMethod · 0.45
findMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected