mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix: allow cluster node load snapshot bigger than maxmemory (#4394)
This commit is contained in:
parent
a3ef239ac7
commit
0832d23f13
2 changed files with 67 additions and 3 deletions
|
@ -2464,9 +2464,14 @@ error_code RdbLoader::HandleAux() {
|
|||
if (absl::SimpleAtoi(auxval, &usedmem)) {
|
||||
VLOG(1) << "RDB memory usage when created " << strings::HumanReadableNumBytes(usedmem);
|
||||
if (usedmem > ssize_t(max_memory_limit)) {
|
||||
LOG(WARNING) << "Could not load snapshot - its used memory is " << usedmem
|
||||
<< " but the limit is " << max_memory_limit;
|
||||
return RdbError(errc::out_of_memory);
|
||||
if (cluster::IsClusterEnabled()) {
|
||||
LOG(INFO) << "Attempting to load a snapshot of size " << usedmem
|
||||
<< ", despite memory limit of " << max_memory_limit;
|
||||
} else {
|
||||
LOG(WARNING) << "Could not load snapshot - its used memory is " << usedmem
|
||||
<< " but the limit is " << max_memory_limit;
|
||||
return RdbError(errc::out_of_memory);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (auxkey == "aof-preamble") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue