MCPcopy Create free account
hub / github.com/F-Stack/f-stack / startLoading

Function startLoading

app/redis-6.2.6/src/rdb.c:2332–2350  ·  view source on GitHub ↗

Mark that we are loading in the global state and setup the fields * needed to provide loading stats. */

Source from the content-addressed store, hash-verified

2330/* Mark that we are loading in the global state and setup the fields
2331 * needed to provide loading stats. */
2332void startLoading(size_t size, int rdbflags) {
2333 /* Load the DB */
2334 server.loading = 1;
2335 server.loading_start_time = time(NULL);
2336 server.loading_loaded_bytes = 0;
2337 server.loading_total_bytes = size;
2338 server.loading_rdb_used_mem = 0;
2339 blockingOperationStarts();
2340
2341 /* Fire the loading modules start event. */
2342 int subevent;
2343 if (rdbflags & RDBFLAGS_AOF_PREAMBLE)
2344 subevent = REDISMODULE_SUBEVENT_LOADING_AOF_START;
2345 else if(rdbflags & RDBFLAGS_REPLICATION)
2346 subevent = REDISMODULE_SUBEVENT_LOADING_REPL_START;
2347 else
2348 subevent = REDISMODULE_SUBEVENT_LOADING_RDB_START;
2349 moduleFireServerEvent(REDISMODULE_EVENT_LOADING,subevent,NULL);
2350}
2351
2352/* Mark that we are loading in the global state and setup the fields
2353 * needed to provide loading stats.

Callers 2

readSyncBulkPayloadFunction · 0.85
startLoadingFileFunction · 0.85

Calls 2

blockingOperationStartsFunction · 0.85
moduleFireServerEventFunction · 0.85

Tested by

no test coverage detected