Merge pull request #23652 from taosdata/fix/TD-27272

fix(cos/multichunk): clear put object data to initial state
This commit is contained in:
wade zhang 2023-11-13 10:10:52 +08:00 committed by GitHub
commit 721990324a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -269,6 +269,7 @@ typedef struct list_parts_callback_data {
typedef struct MultipartPartData {
char err_msg[512];
S3Status status;
uint64_t content_length;
put_object_callback_data put_object_data;
int seq;
UploadManager *manager;
@ -458,13 +459,13 @@ int32_t s3PutObjectFromFile2(const char *file, const char *object) {
int metaPropertiesCount = 0;
S3NameValue metaProperties[S3_MAX_METADATA_COUNT];
char useServerSideEncryption = 0;
int noStatus = 0;
put_object_callback_data data;
put_object_callback_data data = {0};
// int noStatus = 0;
// data.infile = 0;
data.infileFD = NULL;
data.gb = 0;
data.noStatus = noStatus;
// data.gb = 0;
// data.infileFD = NULL;
// data.noStatus = noStatus;
if (taosStatFile(file, &contentLength, NULL, NULL) < 0) {
uError("ERROR: %s Failed to stat file %s: ", __func__, file);