Redis Programmability Documentation#1725
Conversation
The PR add Redis Programability documentation: * Documentation to all FUNCTION commands (notice that FUNCTION INFO is not documented because its about to be dropped): * FUNCTION LOAD (current named FUNCTION CREATE but will be renamed after [this](redis/redis#10004) will be merged) * FUNCTION DELETE * FUNCTION DUMP * FUNCTION FLUSH * FUNCTION KILL * FUNCTION LIST * FUNCTION RESTORE * FUNCTION FLUSH * Introduction to Redis Functions page * Rearrangement of `EVAL` command page * All the information on `EVAL` command page was moved and split between 2 pages: * Introduction to Eval scripts * Lua API for Redis Scripts * New Redis programibality page The PR also require changes on redis-io that was made [here](redis/redis-io#261)
d746a36 to
55026a2
Compare
|
Forced pus to apply the formatter. |
55026a2 to
d746a36
Compare
|
Revert formatter changes according to @oranagra instructions. |
zuiderkwast
left a comment
There was a problem hiding this comment.
That's a lot of changes! 😅
Most of my comments are on typos/spellning/grammar. (That's what catches my attention more than the big picture...)
Regarding the overall structure: The background of Functions describing why Eval scripts are not enough should maybe not be such large part of the beginning of the Functions document? Or at least it can be placed under a sub-heading like "Why Functions?" and not be first on that page?
That background is very biased against Eval and for Functions. On the evalintro page (previously the eval command docs) a similar description is biased towards eval and against a hypothetical server-defined script functionality (written before functions existed).
Maybe it's better to put the comparison of Eval vs Functions on the programability page? Without bias to either of them, just facts?
|
@zuiderkwast sorry for not stopping you - I was reviewing this and it took me a while to complete. Please feel free to give the updated a look. |
|
@itamarhaber I'm assuming you have already fixed the grammar/spelling/typos I commented on, so I'll mark them all as resolved. Feel free to go though my comments and unresolve them if you find that any of them are still relevant. |
oranagra
left a comment
There was a problem hiding this comment.
i didn't read the LDB section, i assume it's mostly copy paste from somewhere.
i didn't go over all the deleted text that was in eval.md to make sure it survived the transition (i.e. that all the valuable info there still exists somewhere).
i only skimmed though the lua-api.md file (reviewed it's top part, but not all the gory details, which i assume are mostly copy-paste)
while reviewing it myself (in the files tab on github), i saw quite a few of @zuiderkwast's wording comment still showing. i think this means that they where probably commented on lines that @itamarhaber didn't change in his edit. that said, i mostly care now about the right content that tells the story correctly and doesn't miss any important detail, and less about wording 😄 |
|
@oranagra all of @zuiderkwast's comments were marked as outdated for me, and I took care when resolving them one by one to make sure I edited them (even if not according to the comment's suggestion). Let future readers proof-read this /wink wink, nudge nudge @banker & @elena-kolevska |
|
i suggest holding back the call for additional reviewer until after some of my comments are addressed. |
* lua-api.md * Splitted `redis.register_function` to positional argument and named arguments * Added redis.REDIS_VERSION API documentaion * Added redis.REDIS_VERSION_NUM API documentaion * functions-into.md * Added section about functions flags with example and flags documentation.
…md as its not relevant to functions.
topics/lua-api.md
Outdated
| For more information about function flags refer to [Function Flags](functions-intro#function-flags) | ||
| #### <a name="script_flags"></a> Script Flags | ||
|
|
||
| The following is a list of supported script flags: |
There was a problem hiding this comment.
i think we should mention the default.
i.e. on functions, all these flags are off by default.
on eval... when shebang is used, it's the same, but if it's not used, it's a different story (maybe refer to another section)
@yoav-steinberg FYI
Co-authored-by: Oran Agra <oran@redislabs.com>
commands/function-stats.md
Outdated
| Otherwise, this is a map with the following keys: | ||
| * **name:** the name of the function. | ||
| * **command:** the command and arguments used for invoking the function. | ||
| * **duration_ms:** the function's runtime duration in milliseconds. | ||
| 2. `engines`: this is an array of simple strings. |
There was a problem hiding this comment.
Blanks needed for correct rendering of the list IIRC.
| Otherwise, this is a map with the following keys: | |
| * **name:** the name of the function. | |
| * **command:** the command and arguments used for invoking the function. | |
| * **duration_ms:** the function's runtime duration in milliseconds. | |
| 2. `engines`: this is an array of simple strings. | |
| Otherwise, this is a map with the following keys: | |
| * **name:** the name of the function. | |
| * **command:** the command and arguments used for invoking the function. | |
| * **duration_ms:** the function's runtime duration in milliseconds. | |
| 2. `engines`: this is an array of simple strings. |
topics/lua-api.md
Outdated
| By default, Redis assumes that all functions read and write data. | ||
| This results in the following behavior: | ||
|
|
||
| 1. Functions can read and write data. | ||
| 1. Functions can run in cluster mode. | ||
| 1. Execution against a stale replica is denied to avoid inconsistent reads. | ||
| 1. Execution under low memory is denied to avoid exceeding the configured threshold. |
There was a problem hiding this comment.
Add that it's denied in a read-only replica?
topics/lua-api.md
Outdated
| Lastly, when data persistence is at risk due to a disk error, execution is blocked as well. | ||
|
|
||
| Using this flag allows executing the function: | ||
| 1. With `FCALL_RO` against masters and read-only replicas. |
There was a problem hiding this comment.
| 1. With `FCALL_RO` against masters and read-only replicas. | |
| 1. With `FCALL_RO` against masters and read-only replicas. |
|
remember not to forget those new INFO fields, i mention it in #1748 |
The PR add Redis Programability documentation:
EVALcommand pageEVALcommand page was moved and split between 2 pages:The PR also require changes on redis-io that was made here