Compare commits

..
Author SHA1 Message Date
benschermel accd3871be update gem reference 2022-06-06 14:55:24 -04:00
2 changed files with 12 additions and 12 deletions

No files matched your search

+3 -3
View File
@@ -552,7 +552,7 @@ static int evictionTimeProc(
UNUSED(clientData);
serverAssert(GlobalLocksAcquired());
if (performEvictions((bool)clientData) == EVICT_RUNNING) return 0; /* keep evicting */
if (performEvictions(false) == EVICT_RUNNING) return 0; /* keep evicting */
/* For EVICT_OK - things are good, no need to keep evicting.
* For EVICT_FAIL - there is nothing left to evict. */
@@ -832,12 +832,12 @@ int performEvictions(bool fPreSnapshot) {
/* After some time, exit the loop early - even if memory limit
* hasn't been reached. If we suddenly need to free a lot of
* memory, don't want to spend too much time here. */
if (elapsedUs(evictionTimer) > eviction_time_limit_us) {
if (g_pserver->m_pstorageFactory == nullptr && elapsedUs(evictionTimer) > eviction_time_limit_us) {
// We still need to free memory - start eviction timer proc
if (!isEvictionProcRunning && serverTL->el != nullptr) {
isEvictionProcRunning = 1;
aeCreateTimeEvent(serverTL->el, 0,
evictionTimeProc, (void*)fPreSnapshot, NULL);
evictionTimeProc, NULL, NULL);
}
break;
}
+9 -9
View File
@@ -1,27 +1,27 @@
# keydb-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo
# redis-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo
# BSD license, See the COPYING file for more information.
#
# Copy the whole dataset from one Redis instance to another one
# Copy the whole dataset from one KeyDB/Redis instance to another one
#
# WARNING: this utility is deprecated and serves as a legacy adapter
# for the more-robust keydb-copy gem.
# for the more-robust redis-copy gem.
require 'shellwords'
def redisCopy(opts={})
src = "#{opts[:srchost]}:#{opts[:srcport]}"
dst = "#{opts[:dsthost]}:#{opts[:dstport]}"
`keydb-copy #{src.shellescape} #{dst.shellescape}`
`redis-copy #{src.shellescape} #{dst.shellescape}`
rescue Errno::ENOENT
$stderr.puts 'This utility requires the keydb-copy executable',
'from the keydb-copy gem on https://rubygems.org',
'To install it, run `gem install keydb-copy`.'
$stderr.puts 'This utility requires the redis-copy executable',
'from the redis-copy gem on https://rubygems.org',
'To install it, run `gem install redis-copy`.'
exit 1
end
$stderr.puts "This utility is deprecated. Use the keydb-copy gem instead."
$stderr.puts "This utility is deprecated. Use the redis-copy gem instead."
if ARGV.length != 4
puts "Usage: keydb-copy.rb <srchost> <srcport> <dsthost> <dstport>"
puts "Usage: redis-copy.rb <srchost> <srcport> <dsthost> <dstport>"
exit 1
end
puts "WARNING: it's up to you to FLUSHDB the destination host before to continue, press any key when ready."