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

Function moduleAllDatatypesHandleErrors

src/module.cpp:4727–4742  ·  view source on GitHub ↗

Returns 0 if there's at least one registered data type that did not declare * REDISMODULE_OPTIONS_HANDLE_IO_ERRORS, in which case diskless loading should * be avoided since it could cause data loss. */

Source from the content-addressed store, hash-verified

4725 * REDISMODULE_OPTIONS_HANDLE_IO_ERRORS, in which case diskless loading should
4726 * be avoided since it could cause data loss. */
4727int moduleAllDatatypesHandleErrors() {
4728 dictIterator *di = dictGetIterator(modules);
4729 dictEntry *de;
4730
4731 while ((de = dictNext(di)) != NULL) {
4732 struct RedisModule *module = (RedisModule*)dictGetVal(de);
4733 if (listLength(module->types) &&
4734 !(module->options & REDISMODULE_OPTIONS_HANDLE_IO_ERRORS))
4735 {
4736 dictReleaseIterator(di);
4737 return 0;
4738 }
4739 }
4740 dictReleaseIterator(di);
4741 return 1;
4742}
4743
4744/* Returns true if any previous IO API failed.
4745 * for `Load*` APIs the REDISMODULE_OPTIONS_HANDLE_IO_ERRORS flag must be set with

Callers 1

useDisklessLoadFunction · 0.85

Calls 3

dictGetIteratorFunction · 0.70
dictNextFunction · 0.70
dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected