(chunkIdx uint64, b []byte)
| 399 | } |
| 400 | |
| 401 | func (ds *DataShard) writeChunk(chunkIdx uint64, b []byte) error { |
| 402 | for _, df := range ds.dataFiles { |
| 403 | if df.Contains(chunkIdx) { |
| 404 | return df.Write(chunkIdx, b) |
| 405 | } |
| 406 | } |
| 407 | return fmt.Errorf("chunk not found: the shard is not completed?") |
| 408 | } |
| 409 | |
| 410 | func (ds *DataShard) WriteMeta(kvIdx uint64, b []byte) error { |
| 411 | for _, df := range ds.dataFiles { |