Commit Graph
4628 Commits
Author SHA1 Message Date
Alexis Campailla 97c4b7b827 Merge 2.8 branch from antirez\redis into 2.8 2015-05-29 17:26:06 +02:00
Alexis Campailla 72d34a87e3 Portability fixes (ssize_t, off_t)
Fix definition of ssize_t and off_t.
2015-05-29 15:26:02 +02:00
Alexis Campailla 6ac1b5db87 test: integration\aof continue run on test failure
When the set client statement throws an exception
the whole test run is aborted.

TODO: verify if this a Windows specific issue
2015-05-28 15:36:28 +02:00
therealbill 22ee2f9cd5 adding a sentinel command: "flushconfig"
This new command triggers a config flush to save the in-memory config to
disk. This is useful for cases of a configuration management system or a
package manager wiping out your sentinel config while the process is
still running - and has not yet been restarted. It can also be useful
for scripting a backup and migrate or clone of a running sentinel.
2015-05-25 12:06:57 +02:00
antirez cdedad2322 Sentinel: CKQUORUM tests 2015-05-19 12:27:26 +02:00
antirez 76412ec9c0 Sentinel: SENTINEL CKQUORUM command
A way for monitoring systems to check that Sentinel is technically able
to reach the quorum and failover, using the currently visible Sentinels.
2015-05-19 12:27:26 +02:00
antirez f42fcff6d2 Rewrite smoveCommand test with ternary operator 2015-05-15 17:39:39 +02:00
Glenn Nethercutt 19382c8be6 uphold the smove contract to return 0 when the element is not a member of the source set, even if source=dest 2015-05-15 17:39:39 +02:00
Jungtaek Lim bea224308b protocol error log should be seen debug/verbose level 2015-05-15 17:06:45 +02:00
antirez 22979836e5 Fix 2.8.20 changelog typo 2015-05-05 11:50:30 +02:00
antirez 11934a9f32 Redis 2.8.20 2.8.20 2015-05-05 11:14:33 +02:00
orangemocha 199eb9f568 Merge pull request #237 from MSOpenTech/WixInstaller
Add MSI installer. This is taken from https://github.com/MSOpenTech/redis/pull/210, with a few more tweaks.
win-2.8.19.1
2015-05-04 18:55:53 +02:00
Alexis Campailla e28dbb53ad Move MSI to a separate solution
Move MSI to a separate solution, so that builing RedisServer.sln
doesn't require having the Wix Toolset installed.
2015-05-04 18:40:34 +02:00
Alexis Campailla 4a9a87bb20 Updated MSI version number to 2.8.19.1 2015-05-04 08:24:40 -07:00
Alexis Campailla 7b336b19fd Updated license in source tree and MSI 2015-05-04 08:24:35 -07:00
Alexis Campailla 21f69fdf7c msi: added/renamed configuration files
Added redis.windows.conf
Renamed redis.service.conf to redis.windows-service.conf
2015-05-04 08:24:31 -07:00
Alexis Campailla 28735c1d38 Add full license text for Wix UI components 2015-05-04 08:24:26 -07:00
Alexis Campailla d835f244ad MSI fixes & tweaks 2015-05-04 08:24:21 -07:00
Alexis Campailla 9a8aade257 Fix msi build 2015-05-04 08:24:16 -07:00
NickMRamirez 23fdac78a6 Added redis.service.conf that turns on logging to the Windows event viewer. This required that we also log to a file with the logfile setting, otherwise messages are not written to the event viewer...probably a mishandling of Windows OS. The event viewer requires a messages resource in the form of a DLL, so I updated the Win32_Interop project to have a custom build step to compile EventLog.res into EventLog.dll. Updated the WiX project to create the Windows event source and also the directory where the event log file will be written. 2015-05-04 08:24:12 -07:00
NickMRamirez 454a4a920b Updated Word doc to include information about how the Windows service works if installed with the MSI. 2015-05-04 08:24:07 -07:00
NickMRamirez 8e4dcd5360 Added a dialog to the installer that lets the user customize the port and firewall exception. The port will update the config file via a new WiX Custom action project. 2015-05-04 08:24:02 -07:00
NickMRamirez a38bbe72e1 Added a UI to the WiX installer. Also, added license text and branded logo images for Redis. 2015-05-04 08:23:58 -07:00
NickMRamirez a4d2df10b8 Removed WiX compiler binaries. We'll be relying on the developer to have installed WiX instead. 2015-05-04 08:23:53 -07:00
NickMRamirez 7e68545292 Removing x86 WiX installer 2015-05-04 08:23:47 -07:00
NickMRamirez c5db422f6d Removed CONFIG WiX property from install command-line instructions. It might be better to use the default and set the config path later. 2015-05-04 08:23:42 -07:00
NickMRamirez c998816b65 Updated path to WixFirewallExentsion.dll 2015-05-04 08:23:38 -07:00
NickMRamirez 87835eb268 Adding missing WiX compiler and linker .exe files that were ignored by .gitignore 2015-05-04 08:23:33 -07:00
NickMRamirez d5119c4882 Added firewall exception for Redis service 2015-05-04 08:23:13 -07:00
NickMRamirez 733dd88d70 Added WiX binaries to source control for 64-bit Windows Installer so that devs won't have to install WiX. 2015-05-04 08:17:14 -07:00
NickMRamirez 437a9c35ce Added a 64-bit Windows installer 2015-05-04 08:16:03 -07:00
NickMRamirez 9bc6c6eeb6 Added WiX binaries to source control so that dev doesn't have to install WiX. 2015-05-04 08:14:58 -07:00
NickMRamirez 1167266815 Initial commit of WiX installer for Redis 2015-05-04 08:14:11 -07:00
FuGangqiang 8db3969971 sdsfree x and y 2015-05-04 13:03:06 +02:00
FuGangqiang 98756d4c0d fix doc example 2015-05-04 13:03:06 +02:00
FuGangqiang 7316fda33a fix typo 2015-05-04 13:03:06 +02:00
Itamar Haber a5bada19be update copyright year 2015-05-04 12:56:52 +02:00
therealbill f0ab4fd6fd Making sentinel flush config on +slave
Originally, only the +slave event which occurs when a slave is
reconfigured during sentinelResetMasterAndChangeAddress triggers a flush
of the config to disk.  However, newly discovered slaves don't
apparently trigger this flush but do trigger the +slave event issuance.

So if you start up a sentinel, add a master, then add a slave to the
master (as a way to reproduce it) you'll see the +slave event issued,
but the sentinel config won't be updated with the known-slave entry.

This change makes sentinel do the flush of the config if a new slave is
deteted in sentinelRefreshInstanceInfo.
2015-05-04 12:55:30 +02:00
antirez e4c54498db Sentinel: remove useless sentinelFlushConfig() call
To rewrite the config in the loop that adds slaves back after a master
reset, in order to handle switching to another master, is useless: it
just adds latency since there is an fsync call in the inner loop,
without providing any additional guarantee, but the contrary, since if
after the first loop iteration the server crashes we end with just a
single slave entry losing all the other informations.

It is wiser to rewrite the config at the end when the full new
state is configured.
2015-05-04 12:55:30 +02:00
Yossi Gottlieb 81a8ebd7f0 Fix Redis server crash when Lua command exceeds client output buffer
limit.
2015-05-04 12:20:28 +02:00
clark.kang c4d4c1ed12 fix sentinel memory leak 2015-05-04 12:18:13 +02:00
Alexis Campailla 05e0ac85cc Fix tabs in Win32_QFork.cpp 2015-05-01 13:23:15 +02:00
Alexis Campailla 0481910ed0 Fix Windows version check
Correclty check for Windows 8 version (6.2), in case this code
path gets re-enabled again.
Note that Windows 10 has version number 10.0, so it would finally
take the code path originally intended for Windows 8 and higher.
2015-05-01 13:12:02 +02:00
Alexis Campailla 624163165b Disabling use of PAGE_REVERT_TO_FILE_MAP
VirtualProtect is failing with ERROR_INVALID_PARAMETER.
It's possible that this code path never worked because it is
checking for Windows version 8.0. Windows 8's version number is 6.2,
not 8.0.

Conflicts:
	src/Win32_Interop/Win32_QFork.cpp
2015-05-01 13:11:02 +02:00
Alexis Campailla 6076412a35 Qfork: RejoinCOWPages issue with swapping
Fix for https://github.com/MSOpenTech/redis/issues/167

RejoinCOWPages used to call QueryWorkingSetEx to figure out
which pages had been dirtied since the memory map was protected
with PAGE_WRITECOPY. But dirty pages that had been swapped out to
the system page file would be reported as not valid
(VirtualAttributes.Valid == 0) and so we wouldn't restore them into
the file map.
QueryWorkingSetEx only gives information about pages that are in the
working set at the time it is called. Pages can be forced into the
working set using VirtualLock, but that seems like a potentially
risky / expensive solution.
I implemented a solution that uses VirtualQuery to find out which
regions have changed protection from PAGE_WRITECOPY.
2015-05-01 12:40:15 +02:00
antirez 081a0c943f Fix Sentinel memory leak (hiredis bug)
This fixes issue #2535, that was actually an hiredis library bug (I
submitted an issue and fix to the redis/hiredis repo as well).

When an asynchronous hiredis connection subscribes to a Pub/Sub channel
and gets an error, and in other related conditions, the function
redisProcessCallbacks() enters a code path where the link is
disconnected, however the function returns before freeing the allocated
reply object. This causes a memory leak. The memory leak was trivial to
trigger in Redis Sentinel, which uses hiredis, every time we tried to
subscribe to an instance that required a password, in case the Sentinel
was configured either with the wrong password or without password at
all. In this case, the -AUTH error caused the leaking code path to be
executed.

It was verified with Valgrind that after this change the leak no longer
happens in Sentinel with a misconfigured authentication password.
2015-04-28 22:15:12 +02:00
antirez d593ae8ab6 sha1.c: use standard uint32_t. 2015-04-27 12:08:03 +02:00
Oran Agra c72253ec54 fixes to diskless replication.
master was closing the connection if the RDB transfer took long time.
and also sent PINGs to the slave before it got the initial ACK, in which case the slave wouldn't be able to find the EOF marker.
2015-04-01 15:21:08 +02:00
antirez 83eb5e7f54 Test: regression for issue #2473. 2015-03-27 12:11:46 +01:00
antirez 96aa610666 Replication: disconnect blocked clients when switching to slave role.
Bug as old as Redis and blocking operations. It's hard to trigger since
only happens on instance role switch, but the results are quite bad
since an inconsistency between master and slave is created.

How to trigger the bug is a good description of the bug itself.

1. Client does "BLPOP mylist 0" in master.
2. Master is turned into slave, that replicates from New-Master.
3. Client does "LPUSH mylist foo" in New-Master.
4. New-Master propagates write to slave.
5. Slave receives the LPUSH, the blocked client get served.

Now Master "mylist" key has "foo", Slave "mylist" key is empty.

Highlights:

* At step "2" above, the client remains attached, basically escaping any
  check performed during command dispatch: read only slave, in that case.
* At step "5" the slave (that was the master), serves the blocked client
  consuming a list element, which is not consumed on the master side.

This scenario is technically likely to happen during failovers, however
since Redis Sentinel already disconnects clients using the CLIENT
command when changing the role of the instance, the bug is avoided in
Sentinel deployments.

Closes #2473.
2015-03-24 16:14:49 +01:00