Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@IRONICBo
Copy link
Collaborator

Background

The basic functionality of new storage has been developed and is currently planned to be interfaced with distributed caching. However, the existing filehandle mechanism and storage does not support the mechanism of version management, so it is necessary to support the import of the version in the version side, in order to facilitate in the distributed cache or other storage module to verify the version of the current block.

Design

Since the current storage will cache the file attr, adding AtomicU64 directly on the external serial node will not be able to utilize this cache, so add a u64 in the serial file attr for recording the logical version.

In the storage trait, add a read interface with version, and set the version number, but in the write handle there is a fetch block operation may need to get the block from the backend, so in the write interface also maintain a version. truncate is the same.

In addition, write is done by a write back task, so the task holds the version of the block when it sends the write.

image

TODO

Currently, there is no detailed maintenance for blocks, so changing some blocks may introduce relatively large version changes, as well as the number of ETCD reads and writes, for example, writing a 20M file with a 512kb block may result in 5000 ETCD version updates.

IRONICBo and others added 30 commits June 3, 2024 17:32
feat: add manager function.
feat: support basic read/write logic for cache node.

feat: add read/write logic.
@IRONICBo IRONICBo self-assigned this Aug 21, 2024
@IRONICBo IRONICBo changed the base branch from master to cache August 23, 2024 06:58
@IRONICBo IRONICBo changed the base branch from cache to new-storage August 23, 2024 06:58
@IRONICBo IRONICBo changed the base branch from new-storage to new_storage_with_cache August 26, 2024 06:56
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