You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/10/08 12:10:13 UTC

[GitHub] [incubator-kvrocks] tanruixiang opened a new issue, #962: Duplicate syntaxs are not judged when parsing

tanruixiang opened a new issue, #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-kvrocks/issues) and found no similar issues.
   
   
   ### Version
   
   unstable branch.
   
   ### Minimal reproduce step
   
   ```
   127.0.0.1:6666> cas key old new ex 1 ex 10
   (integer) 0
   ```
   
   ### What did you expect to see?
   
   (error) ERR syntax error
   
   ### What did you see instead?
   
   Executed successfully.
   
   ### Anything Else?
   
   Maybe other commands have this problem too. I'll fix them after double-checking. Even if the command was coded to prevent this issue (such as CommandSet), the code was written with no generality. I will provide a more general parsing function in this pr.
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on issue #962: Duplicate syntaxs are not judged when parsing

Posted by GitBox <gi...@apache.org>.
tisonkun commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1287983949

   @tanruixiang shall we close this issue as #1017 merged?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tanruixiang commented on issue #962: Align the expire option behavior of redis

Posted by GitBox <gi...@apache.org>.
tanruixiang commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1287994660

   > @tanruixiang shall we close this issue as #1017 merged?
   
   Ok. There are still some unresolved discussions that will be resolved after twice proposes a parsing-design's issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #962: Duplicate syntaxs are not judged when parsing

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1272338388

   I notice that actually it is ok in redis to repeat the same keyword and arguments, e.g.
   
   ```
   127.0.0.1:6379> set key value ex 22 ex 333
   OK
   127.0.0.1:6379> ttl key
   (integer) 331
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tanruixiang closed issue #962: Align the expire option behavior of redis

Posted by GitBox <gi...@apache.org>.
tanruixiang closed issue #962: Align the expire option behavior of redis
URL: https://github.com/apache/incubator-kvrocks/issues/962


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tanruixiang commented on issue #962: Duplicate syntaxs are not judged when parsing

Posted by GitBox <gi...@apache.org>.
tanruixiang commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1272339531

   > I notice that actually it is ok in redis to repeat the same keyword and arguments, e.g.
   > 
   > ```
   > 127.0.0.1:6379> set key value ex 22 ex 333
   > OK
   > 127.0.0.1:6379> ttl key
   > (integer) 331
   > ```
   
   Yes, I've tested redis too, but I think duplication is a very confusing behavior. I think this is also a bug of redis, because in redis, the`set key value ex 10 ex 1` will get `ERR syntax error`
   
   ```
   127.0.0.1:6379> set key value px 1
   OK
   127.0.0.1:6379> set key value ex 10 px 1
   (error) ERR syntax error
   127.0.0.1:6379> set key value ex 10 ex 1
   OK
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #962: Duplicate syntaxs are not judged when parsing

Posted by GitBox <gi...@apache.org>.
git-hulk commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1272341245

   It can't tell whether it's a bug or not from the Redis code. But I guess if Redis won't regard this behavior as a bug then many places need to be fixed since most arguments like `LIMIT` and `COUNT` are allowed duplicate.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tanruixiang commented on issue #962: Duplicate syntaxs are not judged when parsing

Posted by GitBox <gi...@apache.org>.
tanruixiang commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1272344967

   > It can't tell whether it's a bug or not from the Redis code. But I guess if Redis won't regard this behavior as a bug then many places need to be fixed since most arguments like `LIMIT` and `COUNT` are allowed duplicate. Perhaps can raise an issue to ask the Redis community.
   
   If aligning redis is the starting point, we should at least guarantee `cas key old new ex 1 px 10` will throw an error. And the current `CommandSet` logic does not support repeated commands.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #962: Duplicate syntaxs are not judged when parsing

Posted by GitBox <gi...@apache.org>.
git-hulk commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1272345911

   Yes, you're right that Redis also don't allow using `ex`|`px`|`exat` at the same time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #962: Duplicate syntaxs are not judged when parsing

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on issue #962:
URL: https://github.com/apache/incubator-kvrocks/issues/962#issuecomment-1272454059

   +1. There should be a syntax error while different options in same functionality is encountered.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org