topcoderinc / TC-redis-manager

5 stars 15 forks source link

Set is not created if there are already ordered set in a branch #369

Open codejamtc opened 5 years ago

codejamtc commented 5 years ago

image

  1. Deploy the App and run the application
  2. Select a server and select add new record
  3. Create a branch (string) - Branch-A:Branch-B:Branch-C:Branch-D:Branch-E:Branch-F:Branch-G:Branch-H:Branch-I:Branch-J:Branch-K:Branch-L:Branch-M:Branch-N:Branch-O:Key-1
  4. Expand all the branches
  5. Select the Branch-E
  6. Click add new value and add a ordered set and refresh
  7. Click add new value and add a set and refresh

Actual: Set is not created if there are already ordered set in a branch

Expected: Should able to create a set

Browser(s): Chrome 71.0.3578.98 (Windows)

codejamtc commented 5 years ago

https://www.screencast.com/t/xamXppUo

codejamtc commented 5 years ago

This applies to most of the value types

standlove commented 5 years ago

I can add set / ordered-set successfully: @codejamtc https://monosnap.com/file/bxbhKRWZ1whp0f2FvUHMFcrP4iDsBu

codejamtc commented 5 years ago

@standlove After I add one type I can't add another one still. Please check https://www.screencast.com/t/SfoOcMri

standlove commented 5 years ago

That's because they have the same key ... (You don't add anything to the end of the existing Key name).

But the code should report duplicated key error here.

sumitdaga commented 5 years ago

ok so one part of the issue, is that in a branch when we are overriding , we are not catching that (mind that overrinding can also be across types , so if there is a Hash Map with key hashMap, and we add a new string with key hashMap, this should also be caught)
another, sort of related issue, is that overriding is not caught at all if its from the command line
so if there is a Hash Map with key key1 and we enter the command SET key1 value1 , it will be overrided without warning or error

standlove commented 5 years ago

No need to consider this case for CLI.