MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / bulkDirectStorageInsert

Method bulkDirectStorageInsert

src/db.cpp:3017–3027  ·  view source on GitHub ↗

This function is to bulk insert directly to storage provider bypassing in memory, assumes rgKeys and rgVals are not sds strings */

Source from the content-addressed store, hash-verified

3015
3016/* This function is to bulk insert directly to storage provider bypassing in memory, assumes rgKeys and rgVals are not sds strings */
3017void redisDbPersistentData::bulkDirectStorageInsert(char **rgKeys, size_t *rgcbKeys, char **rgVals, size_t *rgcbVals, size_t celem)
3018{
3019 if (g_pserver->cluster_enabled) {
3020 aeAcquireLock();
3021 for (size_t i = 0; i < celem; i++) {
3022 slotToKeyUpdateKeyCore(rgKeys[i], rgcbKeys[i], 1);
3023 }
3024 aeReleaseLock();
3025 }
3026 m_spstorage->bulkInsert(rgKeys, rgcbKeys, rgVals, rgcbVals, celem);
3027}
3028
3029void redisDbPersistentData::commitChanges(const redisDbPersistentDataSnapshot **psnapshotFree)
3030{

Callers 1

flushQueuedKeysMethod · 0.80

Calls 4

aeAcquireLockFunction · 0.85
slotToKeyUpdateKeyCoreFunction · 0.85
aeReleaseLockFunction · 0.85
bulkInsertMethod · 0.45

Tested by

no test coverage detected