Skip to content

Commit

Permalink
Log unused module configuration entries that cause redis to abort (#132)
Browse files Browse the repository at this point in the history
Log unused module configuration entries that cause redis to abort
on startup.

Example:
```
17797:M 31 Mar 2024 12:26:12.146 # Unused Module Configuration: module1.whatever
17797:M 31 Mar 2024 12:26:12.146 # Unused Module Configuration: module2.test
17797:M 31 Mar 2024 12:26:12.146 # Module Configuration detected without loadmodule directive or no ApplyConfig call: aborting
```

Signed-off-by: Gabi Ganam <[email protected]>
  • Loading branch information
gabiganam authored Apr 2, 2024
1 parent c0a83c0 commit 7a7288b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -12109,6 +12109,13 @@ void moduleLoadFromQueue(void) {
listDelNode(server.loadmodule_queue, ln);
}
if (dictSize(server.module_configs_queue)) {
dictIterator *di = dictGetSafeIterator(server.module_configs_queue);
dictEntry *de;
while ((de = dictNext(di)) != NULL) {
const char *moduleConfigName = dictGetKey(de);
serverLog(LL_WARNING, "Unused Module Configuration: %s", moduleConfigName);
}
dictReleaseIterator(di);
serverLog(LL_WARNING, "Module Configuration detected without loadmodule directive or no ApplyConfig call: aborting");
exit(1);
}
Expand Down

0 comments on commit 7a7288b

Please sign in to comment.