-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The PR introduce small API fixes/changes.
Main changes: * Key space notification API will get the keys as `&[u8]` instead of `&str` because key name can be binary. * ErrorReply was changed to be an enum of `RedisError` or general message so we can return this error type even without having an actual `RedisModuleCallReply` error. * Introduce `DetachContext` struct which inplements `Sync` and `Send`. This can be used to create a global context for logging only. * `replicate` can accept also binary data and not only utf8. * `create_string` can accept binary data and not only utf8. * `autenticate_user` implementation was fixed to use the correct `RedisModuleAPI`. * `ThreadSafeContext` lock function was fixed to avoid reuse the context and avoid duplicate context free. * `RedisModule_Init` was split to `RedisModule_Init` and `RedisModule_InitAPI` so we can intialize the API without register a module. This is usefull for modules that load more plugins and want to intialize the `RedisModuleAPI` on the plugin but without Register it as a another module. We should consider backport this change to Redis. * Move `init_func` callback after finish registration of commands and configuration so configuration value will be applied when called. * Introduce `safe_clone` for `RedisModuleString`. In general `RedisModuleString` is none atomic ref counted object. So it is not safe to clone it if Redis GIL is not hold. `safe_clone` gets a context reference which indicating that Redis GIL is held. * Implement serde serialize and deserialize for `RedisString`
- Loading branch information
1 parent
447f8ab
commit bf8d44b
Showing
15 changed files
with
272 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.