mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-20 21:14:25 +02:00
EC decode: read shards with the encode-time block layout (#10385)
* erasure_coding: WriteDatFile takes the encode-time dat size for the shard block layout * volume server: derive EC decode layout from the encode-time dat size, not the live extent * erasure_coding: test decode after tail deletions shrink the live extent below a large-block row * seaweed-volume: write_dat_file_from_shards takes the encode-time dat size for the shard block layout * seaweed-volume: derive EC decode layout from the encode-time dat size, not the live extent * seaweed-volume: test decode after tail deletions shrink the live extent below a large-block row * erasure_coding: reject decoding with no data shards * worker: record the encode-time dat size in the .vif * erasure_coding: fall back to the shard-derived layout only when the encode-time dat size is missing * erasure_coding: reject an ambiguous shard-derived block layout * seaweed-volume: fall back to the shard-derived layout only when the encode-time dat size is missing * seaweed-volume: reject an ambiguous shard-derived block layout
This commit is contained in:
1 parent
cdb60069a6
commit
5a54beac80
9 files changed
+516
-31
No files matched your search
@@ -217,7 +217,7 @@ func TestDecodeAtomicPublish(t *testing.T) {
|
||||
// final .dat nor a partial .dat.tmp behind.
|
||||
datBase := filepath.Join(dir, "bar_2")
|
||||
missingShards := []string{filepath.Join(dir, "does_not_exist.ec00")}
|
||||
if err := erasure_coding.WriteDatFile(datBase, 100, missingShards); err == nil {
|
||||
if err := erasure_coding.WriteDatFile(datBase, 100, 100, missingShards); err == nil {
|
||||
t.Fatalf("expected WriteDatFile to fail on missing shard")
|
||||
}
|
||||
if _, err := os.Stat(datBase + ".dat"); !os.IsNotExist(err) {
|
||||
|
||||
Reference in new issue
Block a user