Replies: 1 comment
-
Nice idea! It's a general problem that exists in all in-memory indexes: memory services, ImmutableIndexLayer, and yes, redis services. Our current design is a bit like an
Please update the RFC before going further. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been implementing Redis service and found the current design of directory tree layout is incorrect and make implementing inelegant. So I'm here to repropose a new way of representing directories in Redis service.
A new struct
RedisEntry
will be introduced:Standing alone from metadata, the relationship between directories and their children will be stored in two additional dimensions of keys,
p
for the parent directory andch
for children:SET
.Listing
For listing directories, just
SSCAN
through it, nice and correct.Create
On creating a file or directory, the backend should create its all parent directories if not present.
Delete
On deleting a file or directory, the backend should remove the entry from its parent's
SET
, and remove all children of entry.Recursion may be needed here.
Pros
Cons
Beta Was this translation helpful? Give feedback.
All reactions