Please sign in to comment.
Warn when configured maxmemory value seems odd.
This commit warns the user with a log at "warning" level if: 1) After the server startup the maxmemory limit was found to be < 1MB. 2) After a CONFIG SET command modifying the maxmemory setting the limit is set to a value that is smaller than the currently used memory. The behaviour of the Redis server is unmodified, and this wil not make the CONFIG SET command or a wrong configuration in redis.conf less likely to create problems, but at least this will make aware most users about a possbile error they committed without resorting to external help. However no warning is issued if, as a result of loading the AOF or RDB file, we are very near the maxmemory setting, or key eviction will be needed in order to go under the specified maxmemory setting. The reason is that in servers configured as a cache with an aggressive maxmemory-policy most of the times restarting the server will cause this condition to happen if persistence is not switched off. This fixes issue #429.
- Loading branch information...