Skip to content

JSON.DEL using multipath may delete wrong elements or not delete all the intended elements #513

Closed

Description

@oshadmi
  • Using redislabs/rejson:edge
JSON.SET doc1 $ '[0, 1, 2, 3, 4]'
OK
127.0.0.1:6379> JSON.DEL doc1 $[2,3] 
(integer) 2
127.0.0.1:6379> JSON.GET doc1 $
"[[0,1,3]]"

The expected result should be 2 and 3 are deleted
But 2 and 4 are deleted instead.

127.0.0.1:6379> json.set doc1 $ '[0, 1, 2, 3, 4]'
OK
127.0.0.1:6379> json.del doc1 $[*] 
(integer) 3
127.0.0.1:6379> json.get doc1 $
"[[1,3]]"

The expected result is an empty array
But 1 and 3 remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions