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

Function incrementErrorCount

src/server.cpp:5184–5192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5182/* ====================== Error lookup and execution ===================== */
5183
5184void incrementErrorCount(const char *fullerr, size_t namelen) {
5185 struct redisError *error = (struct redisError*)raxFind(g_pserver->errors,(unsigned char*)fullerr,namelen);
5186 if (error == raxNotFound) {
5187 error = (struct redisError*)zmalloc(sizeof(*error));
5188 error->count = 0;
5189 raxInsert(g_pserver->errors,(unsigned char*)fullerr,namelen,error,NULL);
5190 }
5191 error->count++;
5192}
5193
5194/*================================== Shutdown =============================== */
5195

Callers 1

afterErrorReplyFunction · 0.85

Calls 3

raxFindFunction · 0.85
zmallocFunction · 0.85
raxInsertFunction · 0.85

Tested by

no test coverage detected