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

Method callback

src/jrd/cch.cpp:960–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

958 { }
959
960 bool callback(thread_db* tdbb, FbStatusVector* status, Ods::pag* page)
961 {
962 Database *dbb = tdbb->getDatabase();
963 int retryCount = 0;
964
965 while (!PIO_read(tdbb, file, bdb, page, status))
966 {
967 if (isTempPage || !read_shadow)
968 return false;
969
970 if (!CCH_rollover_to_shadow(tdbb, dbb, file, false))
971 return false;
972
973 if (file != pageSpace->file)
974 file = pageSpace->file;
975 else
976 {
977 if (retryCount++ == 3)
978 {
979 gds__log("IO error loop Unwind to avoid a hang\n");
980 return false;
981 }
982 }
983 }
984
985 return true;
986 }
987 private:
988 jrd_file* file;
989 BufferDesc* bdb;

Callers 2

internalReadMethod · 0.45
internalWriteMethod · 0.45

Calls 6

CCH_rollover_to_shadowFunction · 0.85
getNTFunction · 0.85
CCH_write_all_shadowsFunction · 0.85
getDatabaseMethod · 0.80
PIO_readFunction · 0.50
PIO_writeFunction · 0.50

Tested by

no test coverage detected