Squashed commit of the following:
commit ba143668b964885ca1b2cf3af927a49bec0f14a4
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jul 7 11:53:46 2015 +0200
[Fix] aeWinQueueAccept wrong return value.
[Change] Variable name acceptsocket changed to acceptfd.
commit 75f6769fd52fe8215bd1a2149f1bd115078ea278
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jul 6 17:26:55 2015 +0200
[Fix] Closing handled before returning.
[Cleanup] Tabs->spaces.
commit 4f22c9be7dee2f34f2cbf5b8a4fd50b87b443937
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jul 6 17:15:20 2015 +0200
[Change] Removed extra space allocated at the end of the mmap file.
[Log] Improved error messages.
commit f306348c243493b192eaeee9aed404ec065bb60c
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Sat Jul 4 12:08:41 2015 +0200
[Fix] RFDMap was not thread safe.
[Cleanup] Removed unused/commented out code, tabs->spaces.
commit 8da060bf484898932f2ecd02c099266eb31d4d80
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Sat Jul 4 12:02:58 2015 +0200
[Fix] UnhandledExceptiontHandler internal exception handling.
commit 99e5e26fba4b48531cd2a544d5a22d6caba0f681
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Thu Jul 2 08:15:11 2015 +0200
[Cleanup] Removed unused include.
commit d812c4ed57cdc30cd817ad2e9181f5bf239dc07b
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jul 1 20:36:13 2015 +0200
[Cleanup] Removed useless platform definition from RedisServer.sln
commit 0401c167120876ca5533beb0bc6054d6401e8b65
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jul 1 20:32:51 2015 +0200
[Cleanup] Changed variable type to match function return value.
checkForSentinelMode() returns an int, not a bool.
commit 6a9ccd3906d5c007d4683d9caea64da78e5ed668
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jul 1 20:27:21 2015 +0200
[Cleanup] Minor change to method signature.
The method input parameter has been changed to a const.
commit e60f617b543edff46ceebb9362f01619e2188594
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jul 1 20:16:00 2015 +0200
[Cleanup] Removed non-existent file from hiredis project.
commit 8d17c3dd052083ec4e47176921337822299167b1
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jul 1 19:58:59 2015 +0200
[WinPort] Explicit cast.
commit 426841dc8c454a2afbc44c8f005cb3bf31b20cd5
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jul 1 17:07:22 2015 +0200
[Change] Move ReleasePackagingTool to its own solution.
[Cleanup] Removed unused code in ReleasePackagingTool.
[Changed] Chocolatey package now imports documents from the same folder where binaries are.
commit 6ed0696c7902d6dc268fd34f55bce95783bc4286
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jul 1 13:58:58 2015 +0200
[Fix] Ignore SymInitialize() return value to make sure Stack Trace is logged
when redis-server is running as a Windows service.
commit f5e18675c9046492e7dd5a2593c2f890627a093d
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 30 19:06:59 2015 +0200
[Change] EventLog.dll excluded from NuGet package.
commit 1ae80857b6fe1b5f352d247376c8fbbd94e81dfc
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 29 16:02:25 2015 +0200
Updated scripts to create and push the NuGet and Chocolatey packages.
- [Change] the binaries are now downloaded from the github release.
- [Change] Redis.nuspec: don't copy the files from the "documentation" folder since the documentation is already included with the binaries.
- [Fix] PullBinaries.ps1: replaced hardcoded Redis version number with input parameter.
- [Fix] improved error handling.
commit c8e70630693a4f505177623824dff998602e62b4
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 29 12:21:58 2015 +0200
Fork code for background processing needed fixes and code refactoring.
- [Fix] BeginForkOperation_Aof()/_Rdb()/_Socket() and BeginForkOperation() code
refactoring.
- [Fix] rewriteAppendOnlyFileBackground() code refactoring to minimize the code
changes for WIN32.
- [Fix] rewriteAppendOnlyFileBackground() must update the latency monitor, the
fork stats and replicationScriptCacheFlush().
- [Fix] rdbSaveBackground() code refactoring to minimize the code changes for
WIN32.
- [Fix] rdbSaveBackground() must update the latency monitor and the fork stats.
- [Fix] memory leak in rdbSaveToSlavesSockets().
- [Fix] properly releasing resources in rdbSaveToSlavesSockets().
- [Fix] QForkChildInit() not setting the operationFailed event in case of
exception.
- [Fix] QForkChildInit() AV in catch() statement.
commit f1007fcaad5ceb17d27fcca081b8dbcf8906ee92
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Fri Jun 26 11:54:09 2015 +0200
[Fix] deleting char** correctly (@zeliard)
commit b8009c220a
Author: Alexis Campailla <alexis@janeasystems.com>
Date: Wed Jun 24 23:10:27 2015 +0200
Fix 32-bit build
commit 4f384b9e58
Author: Alexis Campailla <alexis@janeasystems.com>
Date: Wed Jun 24 21:36:57 2015 +0200
Update appveyor version
commit b84d390111
Author: Alexis Campailla <alexis@janeasystems.com>
Date: Wed Jun 24 20:53:17 2015 +0200
Fix child process handle closing
commit fdbf5328c2
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 24 17:43:54 2015 +0200
MapViewOfFileEx() error handling, UnhandledExceptiontHandler fixes.
[log] Improved error message if MapViewOfFileEx() fails.
[fix] Child process call exist(1) if MapViewOfFileEx() fails.
[new] GetForkOperationStatus() now detects if the child process is not anymore running.
[fix] Error reporting in UnhandledExceptiontHandler() for "UNKNOWN EXCEPTION".
[new] UnhandledExceptiontHandler() now calls the default C++ unhandled exceptiont handler.
[log] Changed the closing statement of the BUG REPORT.
[comment] Removed commented out code in Win32_dlmalloc.c.
commit 05b20f0e4b
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 24 13:05:53 2015 +0200
Change BUG REPORT closing message to point to a different git hub page.
commit 1cb3e84814
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 24 11:59:45 2015 +0200
ReleasePackagingTool changes:
[change] the release notes file is not anymore generated from a template
[change] the .md files are not anymore generated from the .docx files
[new] added redis-server.pdb symbols to the zip package file
[fix] create the release package directory if it doesn't exist
commit 8ea708f9e1
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 24 01:21:27 2015 +0200
New release notes format (similar to Redis on UNIX)
commit e2df601222
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 24 01:16:02 2015 +0200
Fixed broken link in README.
commit 93d00065e4
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 24 01:12:49 2015 +0200
Minor update to the README.
commit bd2ee4d2da
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 23:40:50 2015 +0200
Warning message in config files for the maxmemory flag.
commit 2943ec7db6
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 21:56:31 2015 +0200
Cleaned up the UnhandledExceptiontHandler() code.
Minor changes.
commit b805f2be89
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 19:02:03 2015 +0200
Calling abort() in redisOutOfMemoryHandler().
Changed out-of-memory error report.
commit 18a653318d
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 18:55:53 2015 +0200
Commented out printf calls in dlmalloc.
commit f01052fb5d
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 18:44:32 2015 +0200
Changed #if defined(_WIN64) to #ifdef _WIN64
It was causing an appveyor build failure.
commit a4865f06a9
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 18:15:20 2015 +0200
'save' config flag added to the 'incompatibleNoPersistenceCommands' list.
The fix prevents redis-server from crashing if the 'save' flag is set and
'persistence-available' is set to 'no'.
commit 3de4f6cb47
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 16:54:23 2015 +0200
Change misleading variables/functions names: master->parent, slave->child.
Master and Slave labels were using for the Parent and Child processes.
commit 453b582eed
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 13:46:45 2015 +0200
Updated authors and description for nuget and chocolatey.
commit e91c9eeef7
Merge: 5c05765dc3285a
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 13:40:41 2015 +0200
Merge branch '2.8-enrico' of https://github.com/janeasystems/redis-private into 2.8-enrico
commit dc3285af0b
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 23 11:42:51 2015 +0200
Update Redis on Windows Release Notes.md
commit 5c05765d9a
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 21:23:08 2015 +0200
Typos in warning message.
commit 510cc9bd3e
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 19:57:52 2015 +0200
Replaced AddVectoredExceptionHandler with SetUnhandledExceptionFilter
for unhandled exception handling.
Added log warning if the maxmemory flag is not set.
commit 4993487b25
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 17:33:41 2015 +0200
Fixed links in README.
commit 710d179f91
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 17:25:21 2015 +0200
Added text to links.
commit 04c1ba4c56
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 17:15:48 2015 +0200
Updated documentation.
commit 019d317a10
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 13:58:40 2015 +0200
Use MEM_TOP_DOWN flag to allocate memory for memtest.
commit 3b4bd2f84e
Author: NickMRamirez <nramirez@hmbnet.com>
Date: Wed Jun 10 15:12:07 2015 -0400
Added logic to prevent firewall exception from being added if the Windows Firewall Windows service is stopped.
(cherry picked from commit 12383540c65236b2657f74178d6c2e4ec0c4d15a)
Conflicts:
msvs/msi/RedisMsi/RedisMsi.wixproj
commit 3935ffb302
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 12:35:10 2015 +0200
RejoinCOWPages and background threads should be synchronized (part 2)
commit 87e43c5ce6
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 22 11:23:04 2015 +0200
Changed error message.
commit af7ca8ca28
Author: Alexis Campailla <alexis@janeasystems.com>
Date: Fri Jun 19 21:22:48 2015 +0200
RejoinCOWPages and background threads should be synchronized
RejoinCOWPages is copying dirty pages to a new view
of the memory map.
If another thread modifies the heap between when
RejoincCOWPages copies the data and when the view is
remapped, the modification will be lost, leading to a
memory corruption.
In short, when RejoincCOWPages is running, all other
threads must be stopped.
Fixes: https://github.com/MSOpenTech/redis/issues/244
commit 3cd7d92bf3
Author: Alexis Campailla <alexis@janeasystems.com>
Date: Fri Jun 19 19:31:22 2015 +0200
Build ReleasePackagingTool in Debug for Debug solution configuration
commit 4742811f48
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Fri Jun 19 12:05:32 2015 +0200
Comment wording.
commit 2c8c937325
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Fri Jun 19 00:24:32 2015 +0200
Cleaned up a few #ifdef _WIN32.
commit 2772b6388e
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Fri Jun 19 00:22:32 2015 +0200
Indentation.
commit f8cc98586e
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Fri Jun 19 00:20:19 2015 +0200
StackTrace and info report.
commit d6ede8b354
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Thu Jun 11 17:03:08 2015 +0200
Moved RedisLog.* to Win32_Interop and renamed to Win32_RedisLog.*
Deleted unused file msvs/RedisLog.h
commit 13f36c88e0
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Thu Jun 11 16:05:41 2015 +0200
Added symbols to MSI.
Also updated the release number to 2.8.21.
commit c68970e268
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Thu Jun 11 15:30:04 2015 +0200
Enabled dlmalloc DEBUG mode in the debug build.
commit 1cf1db97ae
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 10 23:08:53 2015 +0200
Final portability fixes for 'long' type.
commit 365c4c7559
Merge: fb63c21fbb9d61
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 10 12:32:11 2015 +0200
Merge version 2.8.21 from antirez into 2.8
Changes to be committed:
modified: 00-RELEASENOTES
modified: deps/lua/src/ldo.c
modified: deps/lua/src/lua_cmsgpack.c
modified: src/scripting.c
modified: src/version.h
commit fb63c21f81
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 10 12:15:57 2015 +0200
Comment.
added a note in case 32bit support will be brought back.
commit bf260ec746
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Wed Jun 10 00:43:46 2015 +0200
Test portability fix.
the 'redis-sentinel' binary is not currently built on Windows, the quick
workaround is to call 'redis-server --sentinel'
commit 2975545e6a
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Tue Jun 9 17:21:56 2015 +0200
Restored support for the command argument --test-memory
along with -h, --help, -v, --version
commit 64c14409d9
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 8 20:40:08 2015 +0200
Added back the RealeasePackaingTool project in the RedisServer.sln build
It was removed by mistake in a previous commit.
commit eaf29cc8aa
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 8 20:35:31 2015 +0200
Truncate AOF in case of unexpected EOF.
The Win32 port was not truncating the AOF file.
commit 91d01bf8fb
Author: Enrico Giordani <enrico.giordani@gmail.com>
Date: Mon Jun 8 16:23:53 2015 +0200
Win32 portability for tests: fix the syntax to invoke 'tail'.
tail -nX file -> tail -X file
commit fbb9d619f7
Author: antirez <antirez@gmail.com>
Date: Thu Jun 4 12:00:21 2015 +0200
Fix 2.8.21 release notes to give full credits.
commit 7f8b865a65
Author: antirez <antirez@gmail.com>
Date: Thu Jun 4 11:32:24 2015 +0200
Redis 2.8.21
commit 700b863f13
Author: Ben Murphy <benmmurphy@gmail.com>
Date: Mon May 11 23:24:37 2015 +0100
hide access to debug table
commit 5a1b22ad7f
Author: Ben Murphy <benmmurphy@gmail.com>
Date: Mon May 11 23:24:24 2015 +0100
disable loading lua bytecode
commit 1eeb9bd714
Author: antirez <antirez@gmail.com>
Date: Wed Jun 3 08:44:43 2015 +0200
Scripting: Lua cmsgpack lib updated to include str8 support
Conflicts:
00-RELEASENOTES
src/version.h
tests/instances.tcl
This test on Linux was extremely slow, since in Tcl we can't enable
easily tcp-nodelay, so the busy loop used to take *a lot* with bigger
writes. Fixed using pipelining.
People mostly use SORT against lists, but our prior
behavior was pretending lists were an unordered bag
requiring a forced-sort when no sort was requested.
We can just use the native list ordering to ensure
consistency across replicaion and scripting calls.
Closes#2079Closes#545 (again)
Basically: test to make sure we can load cmsgpack
and do some sanity checks to make sure pack/unpack works
properly. We also have a bonus test for circular encoding
and decoding because I was curious how it worked.
A few people have written custom C commands because bit
manipulation isn't exposed through Lua. Let's give
them Mike Pall's bitop.
This adds bitop 1.0.2 (2012-05-08) from http://bitop.luajit.org/
bitop is imported as "bit" into the global namespace.
New Lua commands: bit.tobit, bit.tohex, bit.bnot, bit.band, bit.bor, bit.bxor,
bit.lshift, bit.rshift, bit.arshift, bit.rol, bit.ror, bit.bswap
Verification of working (the asserts would abort on error, so (nil) is correct):
127.0.0.1:6379> eval "assert(bit.tobit(1) == 1); assert(bit.band(1) == 1); assert(bit.bxor(1,2) == 3); assert(bit.bor(1,2,4,8,16,32,64,128) == 255)" 0
(nil)
127.0.0.1:6379> eval 'assert(0x7fffffff == 2147483647, "broken hex literals"); assert(0xffffffff == -1 or 0xffffffff == 2^32-1, "broken hex literals"); assert(tostring(-1) == "-1", "broken tostring()"); assert(tostring(0xffffffff) == "-1" or tostring(0xffffffff) == "4294967295", "broken tostring()")' 0
(nil)
Tests also integrated into the scripting tests and can be run with:
./runtest --single unit/scripting
Tests are excerpted from `bittest.lua` included in the bitop distribution.
Previously, "MOVE key somestring" would move the key to
DB 0 which is just unexpected and wrong.
String as DB == error.
Test added too.
Modified by @antirez in order to use the getLongLongFromObject() API
instead of strtol().
Fixes#1428
Also adds test for numsub — due to tcl being tcl,
it doesn't capture the "numberness" of the fix,
but now we at least have one test case for numsub.
Closes#1561
We only want to use the last STORE key, but we have to record
we actually found a STORE key so we can increment the final return
key count.
Test added to prevent further regression.
Closes#1883, #1645, #1647
Previously the end was casted to a smaller type
which resulted in a wrong check and failed
with values larger than handled by unsigned.
Closes#1847, #1844
Lua scripts are executed in the context of the currently selected
database (as selected by the caller of the script).
However Lua scripts are also free to use the SELECT command in order to
affect other DBs. When SELECT is called frm Lua, the old behavior, before
this commit, was to automatically set the Lua caller selected DB to the
last DB selected by Lua. See for example the following sequence of
commands:
SELECT 0
SET x 10
EVAL "redis.call('select','1')" 0
SET x 20
Before this commit after the execution of this sequence of commands,
we'll have x=10 in DB 0, and x=20 in DB 1.
Because of the problem above, there was a bug affecting replication of
Lua scripts, because of the actual implementation of replication. It was
possible to fix the implementation of Lua scripts in order to fix the
issue, but looking closely, the bug is the consequence of the behavior
of Lua ability to set the caller's DB.
Under the old semantics, a script selecting a different DB, has no simple
ways to restore the state and select back the previously selected DB.
Moreover the script auhtor must remember that the restore is needed,
otherwise the new commands executed by the caller, will be executed in
the context of a different DB.
So this commit fixes both the replication issue, and this hard-to-use
semantics, by removing the ability of Lua, after the script execution,
to force the caller to switch to the DB selected by the Lua script.
The new behavior of the previous sequence of commadns is to just set
X=20 in DB 0. However Lua scripts are still capable of writing / reading
from different DBs if needed.
WARNING: This is a semantical change that will break programs that are
conceived to select the client selected DB via Lua scripts.
This fixes issue #1811.
The new check-for-number behavior of Lua arguments broke
users who use large strings of just integers.
The Lua number check would convert the string to a number, but
that breaks user data because
Lua numbers have limited precision compared to an arbitrarily
precise number wrapped in a string.
Regression fixed and new test added.
Fixes#1118 again.
Behrad Zari discovered [1] and Josiah reported [2]: if you block
and wait for a list to exist, but the list creates from
a non-push command, the blocked client never gets notified.
This commit adds notification of blocked clients into
the DB layer and away from individual commands.
Lists can be created by [LR]PUSH, SORT..STORE, RENAME, MOVE,
and RESTORE. Previously, blocked client notifications were
only triggered by [LR]PUSH. Your client would never get
notified if a list were created by SORT..STORE or RENAME or
a RESTORE, etc.
Blocked client notification now happens in one unified place:
- dbAdd() triggers notification when adding a list to the DB
Two new tests are added that fail prior to this commit.
All test pass.
Fixes#1668
[1]: https://groups.google.com/forum/#!topic/redis-db/k4oWfMkN1NU
[2]: #1668
SPOP, tested in the new test, is among the commands rewritng the
client->argv argument vector (it gets rewritten as SREM) for command
replication purposes.
Because of recent optimizations to client->argv caching in the context
of the Lua internal Redis client, it is important to test for SPOP to be
callable from Lua without bad effects to the other commands.