retention: return code from copy
This commit is contained in:
parent
bd758e0269
commit
c4e5cfd2fb
|
@ -179,6 +179,16 @@ static int32_t tsdbMigrateDataFileS3(SRTNer *rtner, const STFileObj *fobj, const
|
||||||
int32_t lino = 0;
|
int32_t lino = 0;
|
||||||
STFileOp op = {0};
|
STFileOp op = {0};
|
||||||
|
|
||||||
|
// remove old
|
||||||
|
op = (STFileOp){
|
||||||
|
.optype = TSDB_FOP_REMOVE,
|
||||||
|
.fid = fobj->f->fid,
|
||||||
|
.of = fobj->f[0],
|
||||||
|
};
|
||||||
|
|
||||||
|
code = TARRAY2_APPEND(rtner->fopArr, op);
|
||||||
|
TSDB_CHECK_CODE(code, lino, _exit);
|
||||||
|
|
||||||
// create new
|
// create new
|
||||||
op = (STFileOp){
|
op = (STFileOp){
|
||||||
.optype = TSDB_FOP_CREATE,
|
.optype = TSDB_FOP_CREATE,
|
||||||
|
@ -204,16 +214,6 @@ static int32_t tsdbMigrateDataFileS3(SRTNer *rtner, const STFileObj *fobj, const
|
||||||
code = tsdbCopyFileS3(rtner, fobj, &op.nf);
|
code = tsdbCopyFileS3(rtner, fobj, &op.nf);
|
||||||
TSDB_CHECK_CODE(code, lino, _exit);
|
TSDB_CHECK_CODE(code, lino, _exit);
|
||||||
|
|
||||||
// remove old
|
|
||||||
op = (STFileOp){
|
|
||||||
.optype = TSDB_FOP_REMOVE,
|
|
||||||
.fid = fobj->f->fid,
|
|
||||||
.of = fobj->f[0],
|
|
||||||
};
|
|
||||||
|
|
||||||
code = TARRAY2_APPEND(rtner->fopArr, op);
|
|
||||||
TSDB_CHECK_CODE(code, lino, _exit);
|
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code);
|
TSDB_ERROR_LOG(TD_VID(rtner->tsdb->pVnode), lino, code);
|
||||||
|
|
Loading…
Reference in New Issue