Git Product home page Git Product logo

Comments (5)

daniel-house avatar daniel-house commented on May 24, 2024

Adding a new alias for the word server seems very risky. I can easily imagine that there are already lua scripts with the word server in them. valkey would seem safer.

from valkey.

zuiderkwast avatar zuiderkwast commented on May 24, 2024

@daniel-house Good point. If script uses a variable named server, they will get an error like I got here:

127.0.0.1:6379> eval 'server = "hello" return server' 0 
(error) ERR user_script:1: Attempt to modify a readonly table script: eaea3495a27b17adb01815dd404912e3f3623d10, on @user_script:1.

@valkey-io/core-team Shall we add a valkey Lua object instead?

I don't think it's a problem actually. Users can only create local variables. It's already possible to create a local variable called redis:

127.0.0.1:6379> eval 'local redis redis = "qux" return redis' 0
"qux"

from valkey.

madolson avatar madolson commented on May 24, 2024

Yeah, you have to create local variables. Someone might already be creating a local server that would shadow the global variable, but that shouldn't break their script. It is a valid callout that some folks might need some soft refactoring if they were declaring a local server variable, which would shadow the global one. I don't see a concern.

from valkey.

madolson avatar madolson commented on May 24, 2024

(Assigning it to me, although someone else from AWS is working on it. I'll update assignment when they join the triage group)

from valkey.

zuiderkwast avatar zuiderkwast commented on May 24, 2024

Fixed by #213

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.