topcoderinc / TC-redis-manager

5 stars 15 forks source link

Delete branches operation is incorrect #363

Closed codejamtc closed 5 years ago

codejamtc commented 5 years ago

image

  1. Deploy the App and run the application
  2. Select a server
  3. Create a branch - BaicUser:BaicUser1:BaicUser2:BaicUser3:BaicUser4:BaicUser5:BaicUser6:BaicUser7
  4. Delete the BaicUser5
  5. Click delete branch

Delete Confirmation Are you sure you want to delete the key "BaicUser:BaicUser1:BaicUser2:BaicUser3:BaicUser4:BaicUser5:"?

Actual: All the branches deleted

Expected: According to the message above only, should delete BaicUser:BaicUser1:BaicUser2:BaicUser3:BaicUser4:BaicUser5:" that means all the below branches should be deleted but actually system should delete the branches below the selected values

Browser(s): Firefox 64.0.2 (Windows)

codejamtc commented 5 years ago

Delete Confirmation Are you sure you want to delete the key "BaicUser:BaicUser1:BaicUser2:BaicUser3:BaicUser4:BaicUser5:"?

Expected: According to the message above should delete BaicUser:BaicUser1:BaicUser2:BaicUser3:BaicUser4:BaicUser5:" that means all the below branches should be retained. But actually system should delete the branches below the selected values not the values above the selected one

Because of this user can't delete a branch in the middle because it will delete all the branches and user needs to create those branches and keys again which is not possible.

standlove commented 5 years ago

As I mentioned in the other issues. Branch is a concept in this app, it's not valid for Redis.

When keys inside the branch are deleted, if the earlier branch has no other keys. The branch won't appear as well.

codejamtc commented 5 years ago

@standlove I can see a bug in here clearly. Please check the below video https://www.screencast.com/t/5yrGPnToePy

  1. I have BaicUserA:BaicUserB:BaicUserC:BaicUserD:BaicUserE:BaicUserF:BaicUserG:BaicUserH
  2. Then I have empty BaicUserD
  3. I have a key (Key-C) with BaicUserC
  4. I have a key (Key-E) with BaicUserE
  5. Then I delete BaicUserD and the message displays:

Delete Confirmation Are you sure you want to delete the key "BaicUserA:BaicUserB:BaicUserC:BaicUserD:"?

  1. But when user click on the YES button, it deletes the BaicUserD to BaicUserH, so the message is wrong in this case or the operation is totally wrong

Please double check. Created a new issue https://github.com/topcoderinc/TC-redis-manager/issues/370