Git Product home page Git Product logo

Comments (8)

git-hulk avatar git-hulk commented on May 24, 2024 1

Currently, in kvrocks, the default namespace is a very special namespace, and admins cannot switch the default namespace to another one. This has some significant drawbacks, such as certain admin operations can only be performed in the default namespace.

We can achieve this by supporting the switch namespace API? The initial design didn't expect the admin to change data of other namespaces except to maintain the namespace/token pair itself. And I do agree the default namespace is very special, but it's to align with the Redis authentication way.

from kvrocks.

13015517713 avatar 13015517713 commented on May 24, 2024

I have learned kvrocks for some time. I have the will to implement that (or have a try).
There are two questions.

  1. Current namespace name is not modifiable, token can be modified by function(namespace set). Does changable 'name' refer to token?
  2. Default namespace is a literal value. How to make it modifiable, is it through config file ?

from kvrocks.

PragmaTwice avatar PragmaTwice commented on May 24, 2024

Yeah, IIRC it's currently something like __namespace, but I think it's better to be changable.

I don't know which one is better: store in rocksdb or in the config file.

cc @mapleFU @git-hulk do you have any idea?

from kvrocks.

PragmaTwice avatar PragmaTwice commented on May 24, 2024

Also another big issue is to be compatible to old version: users can use new version of kvrocks with their old data, and they want these old data can work well.

from kvrocks.

git-hulk avatar git-hulk commented on May 24, 2024

@PragmaTwice I'm not quite sure why we want to make it changeable. If for the space overhead consideration, it shouldn't take much more than the shorter one since the rocksdb has internal compression for the common prefix.

from kvrocks.

PragmaTwice avatar PragmaTwice commented on May 24, 2024

Because I believe the default namespace should have the same status as other namespaces.
Currently, in kvrocks, the default namespace is a very special namespace, and admins cannot switch the default namespace to another one. This has some significant drawbacks, such as certain admin operations can only be performed in the default namespace.
I think this is a design flaw in kvrocks, and correcting it would require some cost at present.

from kvrocks.

mapleFU avatar mapleFU commented on May 24, 2024

Just curious why it should be changable? Is there any reason for that?

Because I believe the default namespace should have the same status as other namespaces.

It's a good reason but I think we have too many legacy user and perhaps this means maintaining two parts of code?

from kvrocks.

PragmaTwice avatar PragmaTwice commented on May 24, 2024

If there is a good solution, we can avoid maintenance difficulties and correct this problem. (But TBH, design errors in the early stage will lead to unbearable costs, and everyone should understand this truth.)

Perhaps it's time for us to reconsider the authentication and permission management in kvrocks.

from kvrocks.

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.