Comments (2)
@yunxing @xiang90 @yichengq Let's revisit and settle on an agreement. At block level, do we allow partly write/read on blocks except the very last block in the file?
I thought our assumption is ReadAt
and WriteAt
always use readBlock
and writeBlock
with len(p) == bsize
and this is exactly how our implementation currently works.
My opinion is allowing len(p) < bsize
make readBlock
and writeBlock
more complicated and we don't even use this logic flow in practice... So maybe a simple solution which just return error and don't handle this case is better. My concern also applies on #52
from cfs.
@yutongp
If we don't allow partial block write, we need to keep the length of the file somewhere. The write path for the last block becomes:
- Create a block with payload
- Fill the rest of the block with zeros
- Append the block to the end
- Update the file length in some databases (which we haven't figure out yet).
The problem is step 3 and 4 are not atomic, which 3 succeeds and 4 fails, we have no way to know what the length of the payload is.
However, I guess in that case, we could just use the old value in the database as its file length.
from cfs.
Related Issues (20)
- add copy file
- make dependencies go getable HOT 1
- try go-fuzz in testing
- add error handling for all rpc calls
- dashboard? HOT 2
- implement truncate
- writeAt should return error if the dir does not exist HOT 2
- readBlock function logic HOT 8
- cgo warning msg when run go test under erasure directory HOT 5
- add travis hook for auto testing HOT 1
- document writeAt and readAt workflow
- disk.ReadAt not return EOF HOT 2
- docker guide on CentOS, Fedora, RHEL
- docker guide on cluster running
- Remove int32 support HOT 4
- support QPS enforcement of each client
- explore recommended way to collect metrics for further usage
- Explore dynamic configs in docker container HOT 1
- Readdir should return "." ?
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.
from cfs.