mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-30 08:50:48 +01:00
Updated Filer Redis Setup (markdown)
1 parent
058f5a22a5
commit
3689daa211
1 file changed
+5
-7
+5
-7
@@ -17,15 +17,13 @@ This is where `redis3` can help. The internal data structure is:
|
||||
|
||||
```
|
||||
<directory_path>: <skip list>
|
||||
<skip list item 1>: <sorted set>
|
||||
<skip list item 2>: <sorted set>
|
||||
<skip list item 1>: <sorted set of 1 million names>
|
||||
<skip list item 2>: <sorted set of 1 million names>
|
||||
...
|
||||
```
|
||||
The directory list is stored as a skip list, and the child names are spread into the list items.
|
||||
|
||||
This prevents each directory entry from being too large and slower to access.
|
||||
The directory list is stored as a skip list, and the child names are spread into the list items. This prevents each directory entry from being too large and slower to access. Skip list has `O(log(N))` access time. With each sorted set storing 1 million names, it should scale very well to billions of files in one directory.
|
||||
|
||||
Compared to `redis2`, there are extra cost to maintain this list:
|
||||
* Adding or deleting needs one additional lock operation.
|
||||
* Updating an entry needs to takes O(log(N)) times to access the skip list item first.
|
||||
So no need to jump to `redis3` in a hurry.
|
||||
* Updating an entry needs to takes `O(log(N))` times to access the skip list item first.
|
||||
So no need to jump to `redis3` in a hurry unless you have to.
|
||||
Reference in new issue
Block a user