fix(client): update client first

with: #1000412030

Signed-off-by: clinx <chenlin1@oppo.com>
(cherry picked from commit c406e88c58)
This commit is contained in:
clinx 2025-12-08 19:09:57 +08:00 committed by chihe
parent 846adfbad5
commit a21a0b6b4c

View File

@ -665,11 +665,16 @@ func (s *Streamer) doOverwrite(req *ExtentRequest, direct bool, storageClass uin
// remote cache.Even if the random write fails, it won't cause the
// remote cache to fail to cache the latest data.
if s.enableRemoteCache() {
// During LTP testing, it was observed that when performing overwrite writes,
// the local file size is altered by metaNode from concurrent client reads,
// causing the user-visible metadata to become inconsistent with the expected
// actual file size. To prevent remote data from updating the local metadata,
// the client increments the generation number (gen) in advance.
s.extents.gen++
err = s.client.metaWrapper.UpdateInodeMeta(s.inode)
if err != nil {
return
}
s.extents.gen++
}
offset := req.FileOffset