From 7cb32da33645f9e1904bc0cf0eb98f804ab0580f Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Wed, 13 Dec 2023 15:14:49 +0800 Subject: [PATCH] fix(cos/put): seek to part offset --- source/common/src/cos.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/common/src/cos.c b/source/common/src/cos.c index d494d6f175..fcc777ac99 100644 --- a/source/common/src/cos.c +++ b/source/common/src/cos.c @@ -671,6 +671,13 @@ upload: continue; } + if (i > 0 && cp.parts[i - 1].completed) { + if (taosLSeekFile(data->infileFD, cp.parts[i].offset, SEEK_SET) < 0) { + code = TAOS_SYSTEM_ERROR(errno); + goto clean; + } + } + int seq = cp.parts[i].index + 1; partData.manager = &manager;