Obliterate STRALGO! add LCS (which only works on keys)#9799
Obliterate STRALGO! add LCS (which only works on keys)#9799oranagra merged 1 commit intoredis:unstablefrom
Conversation
Fix redis#9744 Drop the STRALGO command, now LCS is a command of its own. The motivation is that STRALGO's syntax was really messed-up... - assumes all (future) string algorithms will take similar arguments - mix command take takes keys and one that doesn't in the same command. - make it nearly impossible to expose the right key spec in COMMAND INFO (issues cluster clients) This is a breaking change.
|
best PR ever |
|
It seems that corrupt-dump-fuzzer fail due to the change(the last command is all |
|
i dug into it and this is what i found (hope no one else wastes his time on this)
maybe we should make another PR to completely obliterate LCS from redis (for being a memory hog) |
|
following a discussion with @madolson the idea came up to limit the transient memory allocation of LCS to |
|
handled in #9817 |
LCS can allocate immense amount of memory (sizes of two inputs multiplied by each other). In the past this caused some possible security issues due to overflows, which we solved and also added use of `trymalloc` to return "Insufficient memory" instead of OOM panic zmalloc. But in case overcommit is enabled, it could be that we won't get the OOM panic, and zmalloc will succeed, and then we can get OOM killed by the kernel. The solution here is to prevent LCS from allocating transient memory that's bigger than `proto-max-bulk-len` config. This config is not directly related to transient memory, but using a hard coded value ad well as introducing a specific config seems wrong. This comes to solve an error in the corrupt-dump-fuzzer test that started in the daily CI see #9799
…s#9817) LCS can allocate immense amount of memory (sizes of two inputs multiplied by each other). In the past this caused some possible security issues due to overflows, which we solved and also added use of `trymalloc` to return "Insufficient memory" instead of OOM panic zmalloc. But in case overcommit is enabled, it could be that we won't get the OOM panic, and zmalloc will succeed, and then we can get OOM killed by the kernel. The solution here is to prevent LCS from allocating transient memory that's bigger than `proto-max-bulk-len` config. This config is not directly related to transient memory, but using a hard coded value ad well as introducing a specific config seems wrong. This comes to solve an error in the corrupt-dump-fuzzer test that started in the daily CI see redis#9799
Fix #9744
Drop the STRALGO command, now LCS is a command of its own and it only works on keys (not input strings).
The motivation is that STRALGO's syntax was really messed-up...
This is a breaking change.