Compare commits

..
Author SHA1 Message Date
Malavan Sotheeswaran a12dcea2d9 Merge branch 'unstable' of https://github.com/EQ-Alpha/KeyDB into unstable 2022-04-12 13:12:51 -07:00
Malavan Sotheeswaran 9bb439d7e8 use atomic_load for g_pserver->mstime 2022-04-12 13:12:34 -07:00
Malavan Sotheeswaran af7257c7ce need to include stdint for uintptr_t 2022-04-05 20:46:50 -04:00
Malavan Sotheeswaran cf1e8f855b cannot mod a pointer 2022-04-05 20:46:50 -04:00
Malavan Sotheeswaran 5cb8658c76 remove nullptr subtraction 2022-04-05 20:46:50 -04:00
MalavanEQAlpha 57c04d8562 Merge pull request #408 from EQ-Alpha/fix_long_name_zrangestore_crash
check ziplist len to avoid crash on empty ziplist convert
2022-04-05 13:59:51 -04:00
Malavan Sotheeswaran 6c464bc68b check ziplist len to avoid crash on empty ziplist convert 2022-04-05 03:17:41 -07:00
Malavan Sotheeswaran 60cbb0f1d1 remove unused var in networking.cpp 2022-03-31 18:40:17 -07:00
John Sully ff580de3a2 Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures 2022-03-08 18:20:03 -05:00
John Sully 4b3e23e2fb Fix module test break 2022-03-07 20:20:47 -05:00
John Sully 1f0679da36 Fix MALLOC=memkind build issues 2022-03-06 20:38:00 -05:00
benschermel 2ae3dd6b0a update README resource links 2022-03-06 15:42:48 -05:00
Malavan Sotheeswaran d591df1529 set thread as offline when waiting for time thread lock 2022-02-18 12:46:37 -05:00
Malavan Sotheeswaran cf799eae84 time thread lock uses fastlock instead of std::mutex 2022-02-18 12:46:37 -05:00
Malavan Sotheeswaran 5c816db669 only need to include readwritelock in ae 2022-02-18 12:46:37 -05:00
Malavan Sotheeswaran 7bbd6d73c8 hide forklock object in ae 2022-02-18 12:46:37 -05:00
malavan 0d5b349744 fork lock for all threads, use fastlock for readwritelock 2022-02-18 12:46:37 -05:00
John Sully ccf8d42e4b Update ci.yml
Change min tested version to 18.04
2022-01-31 18:43:54 -05:00
12 changed files with 33 additions and 45 deletions

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ jobs:
./runtest-moduleapi
build-ubuntu-old:
runs-on: ubuntu-16.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: make -j2
+4 -10
View File
@@ -33,19 +33,13 @@ Because of this difference of opinion features which are right for KeyDB may not
Additional Resources
--------------------
Try our docker container: https://hub.docker.com/r/eqalpha/keydb
Check out KeyDB's [Docker Image](https://hub.docker.com/r/eqalpha/keydb)
Talk on Gitter: https://gitter.im/KeyDB
Join us on [Slack](https://docs.keydb.dev/slack/)
Visit our Website: https://keydb.dev
Post to the [Community Forum](https://community.keydb.dev)
See options for channel partners and support contracts: https://keydb.dev/support.html
Learn with KeyDB’s official documentation site: https://docs.keydb.dev
[Subscribe to the KeyDB mailing list](https://eqalpha.us20.list-manage.com/subscribe/post?u=978f486c2f95589b24591a9cc&id=4ab9220500)
Management GUI: We recommend [FastoNoSQL](https://fastonosql.com/) which has official KeyDB support.
Learn more through KeyDB's [Documentation & Learning Center](https://docs.keydb.dev)
Benchmarking KeyDB
-13
View File
@@ -1907,19 +1907,6 @@ void ProcessPendingAsyncWrites()
zfree(c->replyAsync);
c->replyAsync = nullptr;
c->fPendingAsyncWrite = FALSE;
// Now install the write event handler
int ae_flags = AE_WRITABLE|AE_WRITE_THREADSAFE;
/* For the fsync=always policy, we want that a given FD is never
* served for reading and writing in the same event loop iteration,
* so that in the middle of receiving the query, and serving it
* to the client, we'll call beforeSleep() that will do the
* actual fsync of AOF to disk. AE_BARRIER ensures that. */
if (g_pserver->aof_state == AOF_ON &&
g_pserver->aof_fsync == AOF_FSYNC_ALWAYS)
{
ae_flags |= AE_BARRIER;
}
if (!((c->replstate == REPL_STATE_NONE ||
(c->replstate == SLAVE_STATE_ONLINE && !c->repl_put_online_on_ack))))
+1 -1
View File
@@ -136,7 +136,7 @@ robj *createEmbeddedStringObject(const char *ptr, size_t len) {
*
* The current limit of 52 is chosen so that the biggest string object
* we allocate as EMBSTR will still fit into the 64 byte arena of jemalloc. */
#define OBJ_ENCODING_EMBSTR_SIZE_LIMIT 52
size_t OBJ_ENCODING_EMBSTR_SIZE_LIMIT = 52;
//static_assert((sizeof(redisObject)+OBJ_ENCODING_EMBSTR_SIZE_LIMIT-8) == 64, "Max EMBSTR obj should be 64 bytes total");
robj *createStringObject(const char *ptr, size_t len) {
+2 -1
View File
@@ -41,6 +41,7 @@
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
static inline char *med3 (char *, char *, char *,
int (*)(const void *, const void *));
@@ -62,7 +63,7 @@ static inline void swapfunc (char *, char *, size_t, int);
} while (--i > 0); \
}
#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
#define SWAPINIT(a, es) swaptype = (uintptr_t)a % sizeof(long) || \
es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
static inline void
+1 -1
View File
@@ -2412,7 +2412,7 @@ int serverCronLite(struct aeEventLoop *eventLoop, long long id, void *clientData
void blockingOperationStarts() {
if(!g_pserver->blocking_op_nesting++){
g_pserver->blocked_last_cron = g_pserver->mstime;
__atomic_load(&g_pserver->mstime, &g_pserver->blocked_last_cron, __ATOMIC_ACQUIRE);
}
}
+1
View File
@@ -114,6 +114,7 @@ void pool_free(struct alloc_pool *ppool, void *pv)
return;
}
extern size_t OBJ_ENCODING_EMBSTR_SIZE_LIMIT;
#define EMBSTR_ROBJ_SIZE (sizeof(robj)+sizeof(struct sdshdr8)+OBJ_ENCODING_EMBSTR_SIZE_LIMIT+1)
struct alloc_pool poolobj;
struct alloc_pool poolembstrobj;
+17 -15
View File
@@ -1191,24 +1191,26 @@ void zsetConvert(robj *zobj, int encoding) {
zs->dict = dictCreate(&zsetDictType,NULL);
zs->zsl = zslCreate();
eptr = ziplistIndex(zl,0);
serverAssertWithInfo(NULL,zobj,eptr != NULL);
sptr = ziplistNext(zl,eptr);
serverAssertWithInfo(NULL,zobj,sptr != NULL);
if (ziplistLen(zl) > 0) {
eptr = ziplistIndex(zl,0);
serverAssertWithInfo(NULL,zobj,eptr != NULL);
sptr = ziplistNext(zl,eptr);
serverAssertWithInfo(NULL,zobj,sptr != NULL);
while (eptr != NULL) {
score = zzlGetScore(sptr);
serverAssertWithInfo(NULL,zobj,ziplistGet(eptr,&vstr,&vlen,&vlong));
if (vstr == NULL)
ele = sdsfromlonglong(vlong);
else
ele = sdsnewlen((char*)vstr,vlen);
while (eptr != NULL) {
score = zzlGetScore(sptr);
serverAssertWithInfo(NULL,zobj,ziplistGet(eptr,&vstr,&vlen,&vlong));
if (vstr == NULL)
ele = sdsfromlonglong(vlong);
else
ele = sdsnewlen((char*)vstr,vlen);
node = zslInsert(zs->zsl,score,ele);
serverAssert(dictAdd(zs->dict,ele,&node->score) == DICT_OK);
zzlNext(zl,&eptr,&sptr);
node = zslInsert(zs->zsl,score,ele);
serverAssert(dictAdd(zs->dict,ele,&node->score) == DICT_OK);
zzlNext(zl,&eptr,&sptr);
}
}
zfree(zobj->m_ptr);
zobj->m_ptr = zs;
zobj->encoding = OBJ_ENCODING_SKIPLIST;
+1 -1
View File
@@ -243,7 +243,7 @@ void *ztryrealloc_usable(void *ptr, size_t size, size_t *usable) {
#else
realptr = (char*)ptr-PREFIX_SIZE;
oldsize = *((size_t*)realptr);
newptr = realloc(realptr,size+PREFIX_SIZE);
newptr = realloc(realptr,size+PREFIX_SIZE, MALLOC_LOCAL);
if (newptr == NULL) {
if (usable) *usable = 0;
return NULL;
+1
View File
@@ -1,4 +1,5 @@
# Minimal configuration for testing.
bind 127.0.0.1
always-show-logo yes
daemonize no
pidfile /var/run/keydb.pid
+3 -2
View File
@@ -13,8 +13,9 @@ set ::tlsdir "../../tls"
proc main {} {
parse_options
spawn_instance redis $::redis_base_port $::instances_count {
"cluster-enabled yes"
"appendonly yes"
"bind 127.0.0.1"
"cluster-enabled yes"
"appendonly yes"
"testmode yes"
"server-threads 3"
}
+1
View File
@@ -32,6 +32,7 @@ TEST_MODULES = \
auth.so \
keyspace_events.so \
blockedclient.so \
timers.so \
getkeys.so \
test_lazyfree.so \
timer.so \