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. */
| 4725 | * REDISMODULE_OPTIONS_HANDLE_IO_ERRORS, in which case diskless loading should |
| 4726 | * be avoided since it could cause data loss. */ |
| 4727 | int 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 |
no test coverage detected