storage-engine-rust's People
storage-engine-rust's Issues
Test Open storage file
- Create sample storage files
- Copy sample file to temp_dir
- test write, read, delete repetitively and verify file states
Testing framework
Template unit tests and integration test with storage flows
No seek outside file size
Currently, if the 4 blocks have been written, the on reading 5th block (non existent block), the function read seeks read pointer outside the file bound, which is an illegal operation.
Expectation:
- maintain index of last block in the storage
- on request to read block index greater than max block index, return empty vector.
Storage write data methods
- write from buffer
- write from file
return array of block indexes used in order of data
Open existing Storage File
So far we support creating for new storage file and initialisation of storage header and then read/write blocks. But now we need to open existing storage file, read storage header, search empty blocks and then read/write blocks.
ToDo
- implement
Storage.get_storage_header
- read data set usingStorage.get_storage_header
- implement
Storage.read_storage_block_headers
- count total used blocks and updateStorage.free_blocks
for indexing empty blocks - implement
Storage::open
- opens existing StorageFile - useStorage::open_file_writer
with truncate falsestorage-engine-rust/src/storage/mod.rs
Line 120 in a7302bb
IO Cycle
- Atomic Lock
- Serve Reads
- Allocate blocks for writes
- Atomic Lock
- Write to allocated blocks
- Serve Delete requests
- Atomic Lock
Delete Block
Support Delete block operation
- set block data size to 0 and add block to empty blocks index
- set all data bytes to 0 if hard_delete set to true
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.