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

Function discardTransaction

src/multi.cpp:84–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void discardTransaction(client *c) {
85 serverAssert(GlobalLocksAcquired());
86 freeClientMultiState(c);
87 initClientMultiState(c);
88 c->flags &= ~(CLIENT_MULTI|CLIENT_DIRTY_CAS|CLIENT_DIRTY_EXEC);
89 unwatchAllKeys(c);
90}
91
92/* Flag the transaction as DIRTY_EXEC so that EXEC will fail.
93 * Should be called every time there is an error while queueing a command. */

Callers 7

discardCommandFunction · 0.85
execCommandAbortFunction · 0.85
execCommandFunction · 0.85
replicationCacheMasterFunction · 0.85
processCommandFunction · 0.85
RM_CallFunction · 0.85
resetCommandFunction · 0.85

Calls 4

GlobalLocksAcquiredFunction · 0.85
freeClientMultiStateFunction · 0.85
initClientMultiStateFunction · 0.85
unwatchAllKeysFunction · 0.85

Tested by

no test coverage detected