Commit Graph
7 Commits
Author SHA1 Message Date
christianEQ 3a13377335 Merge tag 'tags/6.0.10' into redismerge_2021-01-20
Former-commit-id: 3cdace182152727b2b19362072ab5f6ad55e2cd5
2021-01-26 21:43:09 +00:00
Meir Shpilraien (Spielrein) dbf3902481 Add Module API for version and compatibility checks (#7865)
* Introduce a new API's: RM_GetContextFlagsAll, and
RM_GetKeyspaceNotificationFlagsAll that will return the
full flags mask of each feature. The module writer can
check base on this value if the Flags he needs are
supported or not.

* For each flag, introduce a new value on redismodule.h,
this value represents the LAST value and should be there
as a reminder to update it when a new value is added,
also it will be used in the code to calculate the full
flags mask (assuming flags are incrementally increasing).
In addition, stated that the module writer should not use
the LAST flag directly and he should use the GetFlagAll API's.

* Introduce a new API: RM_IsSubEventSupported, that returns for a given
event and subevent, whether or not the subevent supported.

* Introduce a new macro RMAPI_FUNC_SUPPORTED(func) that returns whether
or not a function API is supported by comparing it to NULL.

* Introduce a new API: int RM_GetServerVersion();, that will return the
current Redis version in the format 0x00MMmmpp; e.g. 0x00060008;

* Changed unstable version from 999.999.999 to 255.255.255

Co-authored-by: Oran Agra <oran@redislabs.com>
Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
(cherry picked from commit e9c837ad31)
2020-10-27 09:12:01 +02:00
Wen Hui d3f36e93a9 Add Swapdb Module Event (#7804)
(cherry picked from commit 0db3223bc6)
2020-10-27 09:12:01 +02:00
John Sully e506455480 Prevent deadlock in RM_ThreadSafeContextLock() when triggered as part of a module callback in a server thread
Former-commit-id: 61119d6c18fe39e93e961985120214c6b263b747
2020-07-12 18:17:53 +00:00
Oran Agra 68c6aacf3b Modules hooks: complete missing hooks for the initial set of hooks
* replication hooks: role change, master link status, replica online/offline
* persistence hooks: saving, loading, loading progress
* misc hooks: cron loop, shutdown, module loaded/unloaded
* change the way hooks test work, and add tests for all of the above

startLoading() now gets flag indicating what is loaded.
stopLoading() now gets an indication of success or failure.
adding startSaving() and stopSaving() with similar args and role.
2019-10-29 17:59:09 +02:00
antirez 3bd7f715c8 Modules hooks: test flush event. 2019-10-24 10:51:03 +02:00
antirez e9f6688a68 Modules hooks: test module draft. 2019-10-23 18:42:02 +02:00