Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

docs for new MINID trim strategy#1488

Merged
oranagra merged 3 commits intoredis:masterfrom
guybe7:stream_trim_minid
Jan 8, 2021
Merged

docs for new MINID trim strategy#1488
oranagra merged 3 commits intoredis:masterfrom
guybe7:stream_trim_minid

Conversation

@guybe7
Copy link
Copy Markdown
Contributor

@guybe7 guybe7 commented Jan 6, 2021

No description provided.

Copy link
Copy Markdown
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for hogging this PR to discuss the new style guides and evaluate their pros and cons.

commands.json Outdated
Comment on lines +4701 to +4702
"name": "threshold",
"type": "string"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe instead of

XTRIM key (MAXLEN|MINID) [=|~] threshold

we want:

XTRIM key ([MAXLEN [=|~] length] | [MINID [=|~] id])

i.e. this way we can name the length as such, and keep it an integer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regrettably, our syntax has implied parenthesis and no way to explicitly state that. Yet another point for future improvement.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itamarhaber why can't we do this:

XTRIM key [MAXLEN [=|~] length] | [MINID [=|~] id]

and then state somewhere that you must provide at least, and only one.

i'm not certain it's better than

XTRIM key (MAXLEN|MINID) [=|~] threshold

just suggesting

Comment on lines +47 to +48
This option is only valid with the `~` modifier and its default is (100 * the number
of entries per macro node).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

referring to "macro node" maybe we wanna refer to stream-node-max-entries?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itamarhaber please respond to this one.

@itamarhaber
Copy link
Copy Markdown
Member

Syntax preview:

image
image

@itamarhaber itamarhaber requested a review from oranagra January 6, 2021 22:08
@oranagra oranagra merged commit 70760fc into redis:master Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants