Git Product home page Git Product logo

Comments (4)

hwware avatar hwware commented on July 21, 2024

@madolson do you think it is a bug?

from valkey.

hpatro avatar hpatro commented on July 21, 2024

I think streams command argument parser is written in a similar manner, where the last argument is picked.

@yyyhe Is that an accidental behavior by the client/yourself of passing the same argument multiple times?

from valkey.

madolson avatar madolson commented on July 21, 2024

I think it's a minor bug, since we aren't conforming to the documented behavior. We had a very similar issue related to 'hello' in the past (you can pass 'auth' multiple times), which I think just low quality argument parsing. I think it's worth trying to clean an up the argument parsing in the next major version.

from valkey.

soloestoy avatar soloestoy commented on July 21, 2024

Here we have an interesting piece of history, which we have discussed many times in the past (I will not quote the issues from Redis here). There are two scenarios:

  1. For conflicting or semantically opposite arguments, Valkey rejects such usage, for example, SET key value xx nx would directly return an error.

  2. As for arguments of the same type, Valkey currently adopts a 'last win' strategy.

The core issue here is the second point, regarding the same arguments. Honestly, I'm not a fan of the 'last win' strategy, it's not a good usage pattern (I suspect that initially using multiple arguments might have likely been a user error). But indeed, there are quite a few users who use it this way. Although we have the opportunity to make some breaking changes in the next major version, we need to be very cautious, because this kind of usage is hard for users to detect themselves and it's difficult to carry out a comprehensive check before upgrading to a major version, which can lead to crash after the upgrade.

from valkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.