From f62b55bbc25ea071916a9f85a62bc69abd07d3be Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 8 Jun 2026 17:07:21 -0700 Subject: [PATCH] fix(ec): log when a local shard is skipped for a different encode run The cross-run guard returned errShardNotLocal, indistinguishable in logs from a genuinely-absent shard. Add a V(1) line naming both EncodeTsNs so operators can tell "wrong encode generation" from "shard not here". --- weed/storage/store_ec.go | 1 + 1 file changed, 1 insertion(+) diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go index 1ef18755f..795d138d4 100644 --- a/weed/storage/store_ec.go +++ b/weed/storage/store_ec.go @@ -530,6 +530,7 @@ func (s *Store) readLocalEcShardInterval(ecVolume *erasure_coding.EcVolume, shar // Skip a local shard from a different encode run than the caller's index; // treat it as not-local so the read recovers from the correct generation. if ecVolume.EncodeTsNs != 0 && ownerVolume.EncodeTsNs != 0 && ecVolume.EncodeTsNs != ownerVolume.EncodeTsNs { + glog.V(1).Infof("skip local ec shard %d.%d from a different encode run: caller EncodeTsNs %d, local %d", ecVolume.VolumeId, shardId, ecVolume.EncodeTsNs, ownerVolume.EncodeTsNs) return fmt.Errorf("shard %d for volume %d: %w", shardId, ecVolume.VolumeId, errShardNotLocal) }