Repository navigation
Support RDB Short Read in RedisJSON (a.k.a diskless-load) - #397
Conversation
| redis-module = { version="0.22", features = ["experimental-api"]} | ||
| jsonpath_lib = { git = "https://github.com/RedisJSON/jsonpath.git", branch = "generic_json_path" } | ||
| #redis-module = { version="0.22", features = ["experimental-api"]} | ||
| redis-module = { git = "https://github.com/RedisLabsModules/redismodule-rs.git", branch = "omer-short-read", features = ["experimental-api"] } |
There was a problem hiding this comment.
Make sure to change that before merge ...
There was a problem hiding this comment.
Sure, we need to bump redis-module version and use the new one here.
MeirShpilraien
left a comment
There was a problem hiding this comment.
Some small comments, we also need tests (as we have on search).
| self.pip_install("toml") | ||
| self.pip_install("awscli") | ||
| self.pip_install("gevent") |
There was a problem hiding this comment.
It would be cleaner to list the deps inside requirements.txt instead of hardcoding. You could add another separate requirements.txt file in addition to the one from the tests.
There was a problem hiding this comment.
I think this is out of the scope of this PR, which is using the existing setup/install "machinery" and I believe changes should be aligned in other repositories as well.
In addition, it should also support none-pip-based packages, so the requirements.txt would be only part of the setup and therefore seems a bit misleading to me, and pip-install commands are interleaved with other commands and logic, so it might need more than a single requirements file.
WDYT - Should we have issues for moving Python packages to requirements.txt file(s)?
| return self.decoder(self.sockf.readline()) | ||
|
|
||
| def send_bulk_header(self, data_len): | ||
| self.sockf.write(self.encoder('$%d\r\n' % data_len)) |
There was a problem hiding this comment.
As a rule, byte strings in Python (as well as in Rust...) should have the b'...' prefix. Plain strings are considered Unicode in Python 3, which is not what you want.
There was a problem hiding this comment.
In this specific method, the string interpolation (format) is used to easily construct the control string for a RESP Bulk String $<LEN>\r\n, then encode the string as bytes.
There's no mix of control string of type str with raw data of type bytes.
Seems OK to me.
I also removed unused methods, including send_bulk_header.
In other methods, such as send_bulk, which may mix str and bytes, I've committed some improvement for the formatting, using the binary % (modulo) operator to construct the bytes
Use Context api set_module_options Use and log the random seed
oshadmi
left a comment
There was a problem hiding this comment.
👍🏼 Thanks for the review!
| jsonpath_lib = { git = "https://github.com/RedisJSON/jsonpath.git", branch = "generic_json_path" } | ||
| #redis-module = { version="0.22", features = ["experimental-api"]} | ||
| redis-module = { git = "https://github.com/RedisLabsModules/redismodule-rs.git", branch = "omer-short-read", features = ["experimental-api"] } | ||
| redis-module = { version="0.23", features = ["experimental-api"]} |
There was a problem hiding this comment.
We need to also bump it on hdt...
Suggested fix should be done in a separate PR (to list deps in requirements.txt)
No description provided.