@@ -100,21 +100,21 @@ static struct flb_aws_header *get_content_encoding_header(int compression_type)
100100 .val = "gzip" ,
101101 .val_len = 4 ,
102102 };
103-
103+
104104 static struct flb_aws_header zstd_header = {
105105 .key = "Content-Encoding" ,
106106 .key_len = 16 ,
107107 .val = "zstd" ,
108108 .val_len = 4 ,
109109 };
110-
110+
111111 static struct flb_aws_header snappy_header = {
112112 .key = "Content-Encoding" ,
113113 .key_len = 16 ,
114114 .val = "snappy" ,
115115 .val_len = 6 ,
116116 };
117-
117+
118118 switch (compression_type ) {
119119 case FLB_AWS_COMPRESS_GZIP :
120120 return & gzip_header ;
@@ -199,7 +199,7 @@ int create_headers(struct flb_s3 *ctx, char *body_md5,
199199 if (ctx -> content_type != NULL ) {
200200 headers_len ++ ;
201201 }
202- if (ctx -> compression == FLB_AWS_COMPRESS_GZIP ||
202+ if (ctx -> compression == FLB_AWS_COMPRESS_GZIP ||
203203 ctx -> compression == FLB_AWS_COMPRESS_ZSTD ||
204204 ctx -> compression == FLB_AWS_COMPRESS_SNAPPY ) {
205205 headers_len ++ ;
@@ -231,7 +231,7 @@ int create_headers(struct flb_s3 *ctx, char *body_md5,
231231 s3_headers [n ].val_len = strlen (ctx -> content_type );
232232 n ++ ;
233233 }
234- if (ctx -> compression == FLB_AWS_COMPRESS_GZIP ||
234+ if (ctx -> compression == FLB_AWS_COMPRESS_GZIP ||
235235 ctx -> compression == FLB_AWS_COMPRESS_ZSTD ||
236236 ctx -> compression == FLB_AWS_COMPRESS_SNAPPY ) {
237237 encoding_header = get_content_encoding_header (ctx -> compression );
@@ -847,7 +847,7 @@ static int cb_s3_init(struct flb_output_instance *ins,
847847 "total_file_size is less than 10 MB, will use PutObject API" );
848848 ctx -> use_put_object = FLB_TRUE ;
849849 }
850-
850+
851851 if (ctx -> use_put_object == FLB_FALSE ) {
852852 /* upload_chunk_size */
853853 if (ctx -> upload_chunk_size <= 0 ) {
@@ -1987,7 +1987,8 @@ static void s3_chunk_retry_exhausted_cleanup(struct flb_s3 *ctx,
19871987 ret = s3_store_file_inactive (ctx , chunk_file );
19881988 if (ret < 0 ) {
19891989 flb_plg_error (ctx -> ins ,
1990- "could not quarantine retry-exhausted chunk" );
1990+ "could not quarantine, deleting retry-exhausted chunk" );
1991+ s3_store_file_delete (ctx , chunk_file );
19911992 return ;
19921993 }
19931994
0 commit comments