10565 Commits

Author SHA1 Message Date
John Sully
010450e68f Fix buggy rebase
Former-commit-id: 6037d1f326116e5aae56be9a73a8f9ca68a45bbe
2019-07-23 18:53:59 -04:00
John Sully
589628823f Fix merge conflict
Former-commit-id: 0b43b51a2e3a6af11532146fbb7929f3ecf3b036
2019-07-23 18:53:59 -04:00
John Sully
f88592451d Plumb support for sub expires to all expire related code
Former-commit-id: 184abac6942a9a6aa8783741b50b23210afddcc5
2019-07-23 18:53:59 -04:00
John Sully
d7a1231238 Fix crash with traditional expiration
Former-commit-id: 0ba5b2c3d66d3a1a520f223ad2c288c22601bd5a
2019-07-23 18:53:58 -04:00
John Sully
2a2225d150 Initial prototype of EXPIREMEMBER command
Former-commit-id: 0b3d74ea67d616a6869cbd66198c8dd7ffa72eb7
2019-07-23 18:53:58 -04:00
John Sully
4568ecf9cd New expire datastructure and algorithm. Allows us to expire in sublinear time
Former-commit-id: ea3bd614b8b88b8de0b114f917fbd0de93557c72
2019-07-23 18:49:31 -04:00
John Sully
be123c44b9 Merge pull request #50 from JohnSully/expire
New Expire Datastructure which is faster and more memory efficient.  This allows us to process expiries in sublinear time.

Former-commit-id: d45edc493d111d4be81f2ce24e3022c8fffb3e2f
2019-07-23 18:40:48 -04:00
John Sully
d58b2575e5 Support TTL stats with the new expire datastructure
Former-commit-id: 271df3dad4f55f20177a8a9a065778f4943835f1
2019-07-23 18:30:10 -04:00
John Sully
d050d20a9f Implement hash table stats and fixup the hash function based on the results
Former-commit-id: 5a193872f8e002c97b7dc2c4bc3bab8e0478765f
2019-07-23 18:30:10 -04:00
John Sully
9420b9c1c2 Add back missing file lost in rebase
Former-commit-id: b5512d77a1299cf6ff960229cd47776b82eaba4b
2019-07-23 18:30:10 -04:00
John Sully
741029118e Add back file erroniously deleted in rebase
Former-commit-id: 42bda8eaba71c99c776100b225606c9aced1d2ba
2019-07-23 18:30:10 -04:00
John Sully
db206557e9 never make last minute changes before commiting
Former-commit-id: 7e5d3f4f160c1c6f91c42b19f95ad17fcb7f1590
2019-07-23 18:30:10 -04:00
John Sully
82bd5f0ecc Fix a few potential assert crashes
Former-commit-id: 5f3920e491a9632d3b84d9af7800c154f2be0809
2019-07-23 18:30:10 -04:00
John Sully
27cb5dba75 New expire datastructure and algorithm. Allows us to expire in sublinear time
Former-commit-id: 3880d2616c882e19169180dc10268564347b0279
2019-07-23 18:30:10 -04:00
John Sully
2e6f1098e4 Any +x bit is acceptable
Former-commit-id: 156e596f9c7a922bc3361652b74b78bbeab0f2dc
2019-07-19 15:26:17 -04:00
John Sully
b2aa7b0683 Any +x bit is acceptable
Former-commit-id: fc58516cca72fc9db97bc4c388f9fa692d115df4
2019-07-19 01:42:05 -04:00
John Sully
08d067fbcf Modules must have execute permissions to load
Former-commit-id: a4efcd35af52227a22daf7f882e8e14db3f8bf57
2019-07-19 01:31:10 -04:00
antirez
1aa5638b93 RDB: make sure to abort on LZF encoding error.
Former-commit-id: 27fe1658a2019bcd5d880e844bac21ccef8303f2
2019-07-19 01:03:16 -04:00
antirez
3e75e77dcd RDB: handle encoding errors with rdbExitReportCorruptRDB().
Without such change, the diskless replicas, when loading RDB files from
the socket will not abort when a broken RDB file gets loaded. This is
potentially unsafe, because right now Redis is not able to guarantee
that encoding errors are safe from the POV of memory corruptions (for
instance the LZF library may not be safe against untrusted data?) so
better to abort when the RDB file we are going to load is corrupted.

Instead I/O errors are still returned to the caller without aborting,
so that in case of short read the diskless replica can try again.


Former-commit-id: 47feb2719ca7fd04e7e108ec1af0f777e536bf8a
2019-07-19 01:02:49 -04:00
John Sully
bb9b8ee164 Fix bad merge in SCAN KEYS command
Former-commit-id: c21af6b351328ffbdb1d1e2a7eed44f8f929f8b2
2019-07-19 00:43:23 -04:00
John Sully
15f5c7ccf7 Merge commit '722446510faf0debf0d309708b2ed4fe4d939319' into unstable
Former-commit-id: 821c12c482d20b15dfb5a6eeab52e167997627d8
2019-07-19 00:32:43 -04:00
John Sully
4088de0ed2 Merge commit '677e95e2f5ee903682ce44a7bfd9558a22577926' into unstable
Former-commit-id: 4602f8c391409e9dd59f1fbee6a5ef011b219ca1
2019-07-19 00:01:56 -04:00
John Sully
e642441354 Fix compile errors from merges
Former-commit-id: 27a927fe0011536c6539d7c2a79ccfdaf78cee22
2019-07-18 23:35:51 -04:00
Angus Pearson
7b615e7274 Add char* typeNameCanonicalize(robj*) to remove duplicate code between SCAN and TYPE commands,
and to keep OBJ_* enum to string canonicalization in one place.


Former-commit-id: 3cdc6e8d846e88cf4e250b2643662bde2a9317c5
2019-07-18 23:31:31 -04:00
John Sully
f84ee30d7d Merge commit '0cabe0cfa7290d9b14596ec38e0d0a22df65d1df' into unstable
Former-commit-id: 89b52da387079fb8693dcbced218b9c6244fb00c
2019-07-18 23:28:56 -04:00
Madelyn Olson
a8fc002adc Fixed some spelling issues in ACL codepath including user facing error
Former-commit-id: 50ad880ad55e7761fe2598e09be43947e88740fe
2019-07-18 23:28:36 -04:00
John Sully
e160fbdeb9 Merge commit 'de035c94816722dd923e4aedd852869de79a5185' into unstable
Former-commit-id: 15bed4bbcc962ec1e8ad5f57653534b721df9a70
2019-07-18 23:26:46 -04:00
John Sully
73df5494a8 Merge commit 'bf963253ecfd367b49081a26c1b5c410558aecfc' into unstable
Former-commit-id: 10986ae3a801c13013ec74880dd1f7969c284d01
2019-07-18 23:22:36 -04:00
John Sully
d129e3df0a Merge commit '7fababd44e8b8b2df53cad0906ec5ab7c678dd44' into unstable
Former-commit-id: 2baa76b2ee6e17c2cc44c559ba58b82875cf8f97
2019-07-18 23:21:13 -04:00
John Sully
f4c0c12e71 Merge commit '074d24df1e82b5c794a5da9fb6cda5b77b60b27b' into unstable
Former-commit-id: ee460301fd160cf3fc82e52cf47d4a5f7503d781
2019-07-18 23:20:46 -04:00
John Sully
c2eba1f742 Merge commit 'caf74e507e6535dab58ce6f3db19f8b594b5f7ca' into unstable
Former-commit-id: 8ebe2fce3da506639acb37fedf1a2d3e47669572
2019-07-18 23:18:42 -04:00
antirez
dec2345007 Test: fix slowlog test false positive.
In fast systems "SLOWLOG RESET" is fast enough to don't be logged even
when the time limit is "1" sometimes. Leading to false positives such
as:

[err]: SLOWLOG - can be disabled in tests/unit/slowlog.tcl
Expected '1' to be equal to '0'


Former-commit-id: 8198a697fd4455c88712099f20632e554fb564d4
2019-07-18 23:12:52 -04:00
antirez
a9dbdb3348 Make comment in getClientOutputBufferMemoryUsage() describing the present.
Former-commit-id: 35acae360a4c3c67370b03b4835c51b08194ca28
2019-07-18 23:12:39 -04:00
antirez
b70266f3d3 Fix test false positive introduced by threaded I/O.
Now clients that are ready to be terminated asynchronously are processed
more often in beforeSleep() instead of being processed in serverCron().
This means that the test will not be able to catch the moment the client
was terminated, also note that the 'omem' figure now changes in big
steps, because of the new client output buffers layout.

So we have to change the test range in order to accomodate for that.
Yet the test is useful enough to be worth taking, even if its precision
is reduced by this commit. Probably if we get more problems, a thing
that makes sense is just to check that the limit is < 200k. That's more
than enough actually.


Former-commit-id: 8aaa8b0b116dc86473b6a94bf2ff330dd4163ca1
2019-07-18 23:12:05 -04:00
John Sully
47e7652611 Active Replicas should always use their own slaveseldb variable when sending/saving rdbs - never those of their masters. This is because the Active Replica is also simultaneously a master
Former-commit-id: bb090b6d20bfc3d5d3ca07270f64bf15fad42681
2019-07-18 20:50:20 -04:00
John Sully
727bda7108 remove unnecessary variables
Former-commit-id: a9c4e3970fd0d00896cb5500b2cc926ec3177bc4
2019-07-18 19:37:49 -04:00
John Sully
2110b84f7e Fix issue #59 - Test replicaof config variable
Former-commit-id: d5ecc2347a717f6e6f938d81325476a9c3dff9a6
2019-07-18 19:22:49 -04:00
John Sully
7ba2941735 Add support for sanitizers and fix issues they have found
Former-commit-id: 58971a430dd3e4e8c39c7b5288211bc2ba7699ed
2019-07-18 18:39:42 -04:00
John Sully
e41ab66722 Resolve race on neterr variable
Former-commit-id: 1512274f4c51dc4e8f4e3d11df2f35e051c0c079
2019-07-18 17:11:28 -04:00
John Sully
aa560582b4 Make object refcounts atomic, technically it doesn't need to be currently but the semantics are complicated and error prone. This is much safer with little performance impact
Former-commit-id: e310d33c121550f69b1c06d101db0c3f944a7fb0
2019-07-18 15:49:12 -04:00
John Sully
afa1a2e023 Suppress initialized data sanitizer warnings
Former-commit-id: ad32ba0343a241c46206ada273b0c0125e9e3101
2019-07-18 15:49:03 -04:00
John Sully
452ace5b95 Another RESP3 regression
Former-commit-id: 4e30a5b4e53a4d1580f8d7cca8a8eac11e36ce4d
2019-07-17 22:57:52 -04:00
John Sully
cb58295ade Fix Issue #58
Former-commit-id: c8516f3dc484920de4fc52acd72f5104d643ca87
2019-07-17 02:34:02 -04:00
John Sully
bc0c9054b2 Shared objects should be marked as such
Former-commit-id: aae0fdc11434fa76a1847eca9292c277b559730a
2019-07-16 18:32:01 -04:00
John Sully
79731e805a Crash when aborting SYNC with a master on a thread other than main
Former-commit-id: a19d0f67b9fffefd9029b9a2ef3358b110302bbf
2019-07-15 14:55:41 -04:00
John Sully
bdc901f01c Implement test mode to make finding bugs easier
Former-commit-id: 971f69fe1ff9cce50492a47f306b312457e50b9f
2019-07-15 14:55:18 -04:00
John Sully
a9500e5483 Blocked clients can stall when under low load
Former-commit-id: 7468c691ad04829c1fd3ae69f206946e8f38254a
2019-07-13 16:44:11 -04:00
John Sully
0dd9a27420 Give the active-rep more time to sync for test reliability
Former-commit-id: 620c2ec1412a3bcea5fecf21238caa065e73f3e9
2019-07-12 23:52:07 -04:00
John Sully
e78ed8cc64 Fix more locking deadlocks
Former-commit-id: 3081b6f98b5e7a9f3ef7cfe040236070398b081c
2019-07-12 23:51:45 -04:00
John Sully
8f1e7d9d5b Fix deadlock with client and ae locks
Former-commit-id: 8630339e43c1de1cd723bdfdca8ab5924e2cb8b0
2019-07-12 20:46:50 -04:00