This patch substitutes uint64_t for uint32_t as the type for commitlog_total_space_in_mb. Moving to 64 is not strictly needed, since even a signed 32-bit type would allow us to easily handle 2TB. But since we store that in the commitlog as a 64-bit value, let's match it. Moving from unsigned to signed, however, allow us to represent negative numbers. With that in place, we can change the semantics of the value slightly, so to allow a negative number to mean "all memory". The reason behind this, is that the default value "8GB", is an artifact of the JVM. We don't need that, and in many-shards configuration, each shard flushes the commitlog way too often, since 8GB / many_shards = small_number. 8GB also happens to be a popular heap size for C* in the JVM. For us, we would like to equate that (at least) with the amount of memory. The problem is how to do that without introducing new options or changing the semantics of existing options too radically. The proposed solution will allow us to still parse C* yaml files, since those will always have positive numbers, while introducing our own defaults. Signed-off-by: Glauber Costa <glommer@scylladb.com>
50 KiB
50 KiB