Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FLUSHDB doesn't affect index #151

@stockholmux

Description

@stockholmux

Index survives past FLUSHDB - this will be undesirable.

Consider this:

$ launchctl start io.redis.redis-server
$ redis-cli
> keys *
(empty list or set)
> json.set user1 $ '{"last":"Joe", "first":"Mc"}' INDEX person
OK
> json.index add person last $.last
OK
> JSON.QGET person Jo*
"{\"user1\":[{\"last\":\"Joe\",\"first\":\"Mc\"}]}"
> flushdb
OK
> JSON.QGET person Jo*
"{\"user1\":[]}"

This will be a very unexpected outcome for most Redis users. FLUSHDB (or FLUSHALL) should remove all data and this type of behaviour could reveal information that could be sensitive.

I assume that the indexes are behind held outside of keyspace, which I get to some degree, but this will be very strange to explain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions