Skip to content

GEODE-10032: Add Category to RedisCommandType#7354

Merged
jdeppe-pivotal merged 4 commits intoapache:developfrom
jdeppe-pivotal:feature/GEODE-10032-add-command-category
Feb 14, 2022
Merged

GEODE-10032: Add Category to RedisCommandType#7354
jdeppe-pivotal merged 4 commits intoapache:developfrom
jdeppe-pivotal:feature/GEODE-10032-add-command-category

Conversation

@jdeppe-pivotal
Copy link
Contributor

  • This adds a single category (or type) to each command in order to
    identify the type of data structure it applies too. This is initially
    being done in order to allow Geode statistics to be finer grained in
    how the Radish-specific stats are grouped.
  • The category is derived from Redis' ACL Categories. In Redis these
    categories also include the command's flags (and possibly additional
    values). This implementation only specifies the category as it relates
    to the command's data type. For example, in Redis the GET command
    has categories @read, @fast and @string. In Geode, the category
    would only be @string. This may well change in the future if ACLs
    are implemented.

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

- This adds a single category (or type) to each command in order to
  identify the type of data structure it applies too. This is initially
  being done in order to allow Geode statistics to be finer grained in
  how the Radish-specific stats are grouped.
- The category is derived from Redis' ACL Categories. In Redis these
  categories also include the command's flags (and possibly additional
  values). This implementation only specifies the category as it relates
  to the command's data type.  For example, in Redis the `GET` command
  has categories `@read`, `@fast` and `@string`. In Geode, the category
  would only be `@string`. This may well change in the future if ACLs
  are implemented.
@jdeppe-pivotal jdeppe-pivotal added the redis Issues related to the geode-for-redis module label Feb 10, 2022
@jdeppe-pivotal jdeppe-pivotal changed the title GEODE-10032: Add Category to RadishCommandType GEODE-10032: Add Category to RedisCommandType Feb 11, 2022
Comment on lines +416 to +417
SELECT(new SelectExecutor(), Category.KEYSPACE, UNSUPPORTED,
new Parameter().exact(2).firstKey(0).flags(LOADING, STALE, FAST)),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think select still needs to be in the connection section. In the redis docs all the related commands are connection commands

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The category information is derived from the categories returned by the INFO command. So against Redis, INFO SELECT lists the categories as @keyspace and @fast. Using these values allows us to verify against a stricter source (any given redis version). The docs are a lot less specific and could easily re-categorize commands without us knowing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or were you referring to just where in the file this entry appears?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, I was just referring to its location. but if the info command has it in that section then that's fine. makes sense to use the info command to categorize our commands

@jdeppe-pivotal jdeppe-pivotal merged commit fc3f991 into apache:develop Feb 14, 2022
Copy link
Contributor

@onichols-pivotal onichols-pivotal left a comment

Choose a reason for hiding this comment

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

As per https://cwiki.apache.org/confluence/display/GEODE/Commit+Message+Format, first commit summary should be under 29 characters (not including bug# or pr#) (yours is 33 characters). If you amend your initial commit now and force-push, you can benefit from review feedback on your commit message, and you won't have to remember to fix it later when you merge.

mhansonp pushed a commit to mhansonp/geode that referenced this pull request Mar 11, 2022
- This adds a single category (or type) to each command in order to
  identify the type of data structure it applies too. This is initially
  being done in order to allow Geode statistics to be finer grained in
  how the Radish-specific stats are grouped.
- The category is derived from Redis' ACL Categories. In Redis these
  categories also include the command's flags (and possibly additional
  values). This implementation only specifies the category as it relates
  to the command's data type.  For example, in Redis the `GET` command
  has categories `@read`, `@fast` and `@string`. In Geode, the category
  would only be `@string`. This may well change in the future if ACLs
  are implemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

redis Issues related to the geode-for-redis module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants