dice icon indicating copy to clipboard operation
dice copied to clipboard

Added support for SCAN command with it's supported flags and parameters as given in REDI.

Open rohitlohar45 opened this issue 1 year ago • 6 comments

Implemented SCAN Command

  • Feature Addition:

    • Introduced the SCAN command in our key-value store, closely modeled after Redis's SCAN command.
    • The command supports optional parameters:
      • MATCH: Allows pattern matching of keys.
      • COUNT: Specifies the number of keys to return in each iteration.
      • TYPE: Filters keys by their type (e.g., string, list).
  • Error Handling:

    • Added comprehensive error handling for invalid or malformed SCAN commands, including incorrect cursor values and invalid options.

Manual Testing:

  • Conducted manual testing to validate the functionality of the SCAN command across different scenarios, with screenshots attached to demonstrate the results.

Writing the unit tests and and tried benchmarking on SCAN 0 and SCAN 0 COUNT 20 yet need to cover all commands yet. Will do it once the code is reviewed and ready to proceed to write unit tests.

Screenshot 2024-08-19 162846

Screenshot 2024-08-19 162830

rohitlohar45 avatar Aug 19 '24 11:08 rohitlohar45

Please resolve conflicts

JyotinderSingh avatar Aug 19 '24 11:08 JyotinderSingh

Resolved the conflicts @JyotinderSingh

rohitlohar45 avatar Aug 19 '24 11:08 rohitlohar45

Please fix the CI errors.

JyotinderSingh avatar Aug 19 '24 17:08 JyotinderSingh

Hey @JyotinderSingh I am getting integer overflow errors while linting should I go ahead and fix them ( am I allowed to do this?) image

rohitlohar45 avatar Aug 22 '24 15:08 rohitlohar45

Hey @JyotinderSingh I am getting integer overflow errors while linting should I go ahead and fix them ( am I allowed to do this?)

image

cc @AshwinKul28

JyotinderSingh avatar Aug 22 '24 16:08 JyotinderSingh

Try to pull latest from master, @rohitlohar45 check if few of these gets resolved. Otherwise try to fix as much as you can for other add a ignore statement //nolint:{lint_name}, I will check them separately. But make sure all test cases passed!

AshwinKul28 avatar Aug 22 '24 17:08 AshwinKul28