Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to HASH and SET datatypes #9

Merged
merged 12 commits into from
Aug 13, 2023
Merged

Conversation

moticless
Copy link
Collaborator

@moticless moticless commented Jul 31, 2023

Following this PR, the parser will be able to parse HASH and SET data types.

  • This includes: plain hash, ziplist hash, listpack hash, zipmap hash, plain set, intset and listpack set.
  • Added corresponding tests for json, resp and redis formaters.
  • Data integrity doesn't check for duplication of elements that was read from RDB (if it is important to client, then it is the one to implement it).
  • Added corresponding tests for json, resp and redis formaters.
  • As list data-type also uses ziplist and listpack - some refactor was made at parserRaw.c.
  • Copied implementation of zipmap from Redis to deps/redis/zipmap.c

How to review:

  • librdb-api.h
  • tests: review the filenames. Review the json files to see the expected output.
  • Please review core parser code (parser.c and parserRaw.c)

Another commit:
fixed BulkInfo pointers invalidation due to realloc() by BulkAlloc.c. The fix is to avoid any realloc() and use simple list instead. To review it, see bulkAlloc.c

@moticless moticless requested a review from oranagra July 31, 2023 10:39
@oranagra
Copy link
Member

that's a lot of code and no description.
please fill it and let me know what to focus on.

@moticless moticless changed the title Support hash; Fix pointer invalidation due to realloc() by Bulk-pool Add support to HASH and SET datatypes Aug 8, 2023
api/librdb-api.h Show resolved Hide resolved
api/librdb-api.h Outdated Show resolved Hide resolved
api/librdb-api.h Outdated Show resolved Hide resolved
src/cli/rdb-cli.c Outdated Show resolved Hide resolved
src/lib/parserRaw.c Show resolved Hide resolved
src/lib/parser.c Outdated Show resolved Hide resolved
src/lib/parser.c Outdated Show resolved Hide resolved
src/lib/parser.c Show resolved Hide resolved
src/lib/parser.c Outdated Show resolved Hide resolved
api/librdb-api.h Outdated Show resolved Hide resolved
oranagra
oranagra previously approved these changes Aug 13, 2023
api/librdb-api.h Outdated Show resolved Hide resolved
@moticless moticless merged commit 129bef5 into redis:main Aug 13, 2023
1 check passed
@moticless moticless deleted the hash-support3 branch August 13, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants