- 19 Nov, 2019 18 commits
-
-
Salvatore Sanfilippo authored
Improve RM_Call() errno classification.
-
Salvatore Sanfilippo authored
aof: fix assignment for aof_fsync_offset
-
Salvatore Sanfilippo authored
test infra: improve prints on failed assertions
-
antirez authored
-
antirez authored
-
Salvatore Sanfilippo authored
expires & blocking: handle ready keys as call()
-
Yossi Gottlieb authored
RM_Call() will now use EBADF and ENONET in addition to EINVAL in order to provide more information about errors (i.e. when return value is NULL).
-
antirez authored
-
Salvatore Sanfilippo authored
Added scan implementation to module api.
-
Salvatore Sanfilippo authored
-
antirez authored
-
Salvatore Sanfilippo authored
module docs, missing LOADING flag
-
Salvatore Sanfilippo authored
Add RM_ModuleTypeReplaceValue.
-
Salvatore Sanfilippo authored
Redis Module API calls to allow re-use of data type RDB save/load.
-
Salvatore Sanfilippo authored
Slightly more efficient RM_ReplyWithEmptyString
-
Salvatore Sanfilippo authored
XADD with ID 0-0 stores an empty key
-
Salvatore Sanfilippo authored
Update mkreleasehdr.sh
-
喜欢兰花山丘 authored
fix date +%s errata
-
- 18 Nov, 2019 5 commits
- 15 Nov, 2019 2 commits
- 14 Nov, 2019 5 commits
-
-
antirez authored
-
antirez authored
-
Oran Agra authored
trimming talk about RESP protocol from API docs (should be independent to that anyway)
-
Oran Agra authored
-
Yossi Gottlieb authored
This is a light-weight replace function, useful for use cases such as realloc()ing an existing value, etc. Using RM_ModuleTypeSetValue() in such cases is wasteful and complex as it attempts to delete the old value, call its destructor, etc.
-
- 13 Nov, 2019 1 commit
-
-
Guy Benoish authored
Calling XADD with 0-0 or 0 would result in creating an empty key and storing it in the database. Even worse, because XADD will reply with error the action will not be replicated, creating a master-replica inconsistency
-
- 11 Nov, 2019 2 commits
-
-
Oran Agra authored
- Adding RM_ScanKey - Adding tests for RM_ScanKey - Refactoring RM_Scan API Changes in RM_Scan - cleanup in docs and coding convention - Moving out of experimantal Api - Adding ctx to scan callback - Dont use cursor of -1 as an indication of done (can be a valid cursor) - Set errno when returning 0 for various reasons - Rename Cursor to ScanCursor - Test filters key that are not strings, and opens a key if NULL
-
meir@redislabs.com authored
The implementation expose the following new functions: 1. RedisModule_CursorCreate - allow to create a new cursor object for keys scanning 2. RedisModule_CursorRestart - restart an existing cursor to restart the scan 3. RedisModule_CursorDestroy - destroy an existing cursor 4. RedisModule_Scan - scan keys The RedisModule_Scan function gets a cursor object, a callback and void* (used as user private data). The callback will be called for each key in the database proving the key name and the value as RedisModuleKey.
-
- 08 Nov, 2019 1 commit
-
-
zhaozhao.zz authored
-
- 06 Nov, 2019 2 commits
-
-
antirez authored
-
antirez authored
One problem with the solution proposed so far in #6537 is that key lookups outside a command execution via call(), still used a cached time. The cached time needed to be refreshed in multiple places, especially because of modules callbacks from timers, cluster bus, and thread safe contexts, that may use RM_Open(). In order to avoid this problem, this commit introduces the ability to detect if we are inside call(): this way we can use the reference fixed time only when we are in the context of a command execution or Lua script, but for the asynchronous lookups, we can still use mstime() to get a fresh time reference.
-
- 05 Nov, 2019 2 commits
-
-
antirez authored
After the thread in #6537 and thanks to the suggestions received, this commit updates the original patch in order to: 1. Solve the problem of updating the time in multiple places by updating it in call(). 2. Avoid introducing a new field but use our cached time. This required some minor refactoring to the function updating the time, and the introduction of a new cached time in microseconds in order to use less gettimeofday() calls.
-
zhaozhao.zz authored
Calling lookupKey*() many times to search a key in one command may get different result. That's because lookupKey*() calls expireIfNeeded(), and delete the key when reach the expire time. So we can get an robj before the expire time, but a NULL after the expire time. The worst is that may lead to Redis crash, for example `RPOPLPUSH foo foo` the first time we get a list form `foo` and hold the pointer, but when we get `foo` again it's expired and deleted. Now we hold a freed memory, when execute rpoplpushHandlePush() redis crash. To fix it, we can refactor the judgment about whether a key is expired, using the same basetime `server.cmd_start_mstime` instead of calling mstime() everytime.
-
- 04 Nov, 2019 2 commits
-
-
Yossi Gottlieb authored
Add two new functions that leverage the RedisModuleDataType mechanism for RDB serialization/deserialization and make it possible to use it to/from arbitrary strings: * RM_SaveDataTypeToString() * RM_LoadDataTypeFromString()
-
Salvatore Sanfilippo authored
Test coverage for new module APIs: dbsize, flushall, randomkey, lru get/set
-