Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions plugins/out_azure_blob/azure_blob.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,8 @@ static int process_blob_chunk(struct flb_azure_blob *ctx, struct flb_event_chunk
continue;
}

ret = azb_db_file_insert(ctx, source, ctx->endpoint, file_path, file_size);
ret = azb_db_file_insert(ctx, source, ctx->real_endpoint, file_path, file_size);

if (ret == -1) {
flb_plg_error(ctx->ins, "cannot insert blob file into database: %s (size=%lu)",
file_path, file_size);
Expand Down Expand Up @@ -893,10 +894,13 @@ static void cb_azb_blob_file_upload(struct flb_config *config, void *out_context
/* just continue, the row info was retrieved */
}

if (strcmp(file_destination, ctx->endpoint) != 0) {

if (strcmp(file_destination, ctx->real_endpoint) != 0) {
flb_plg_info(ctx->ins,
"endpoint change detected, restarting file : %s",
file_path);
"endpoint change detected, restarting file : %s\n%s\n%s",
file_path,
file_destination,
ctx->real_endpoint);

info->active_upload = FLB_FALSE;

Expand Down
2 changes: 1 addition & 1 deletion plugins/out_azure_blob/azure_blob_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ int azb_db_file_part_get_next(struct flb_azure_blob *ctx,
*part_delivery_attempts = sqlite3_column_int64(ctx->stmt_get_next_file_part, 5);
tmp = (char *) sqlite3_column_text(ctx->stmt_get_next_file_part, 6);
*file_delivery_attempts = sqlite3_column_int64(ctx->stmt_get_next_file_part, 7);
tmp_destination = (char *) sqlite3_column_text(ctx->stmt_get_next_file_part, 8);
tmp_destination = (char *) sqlite3_column_text(ctx->stmt_get_next_file_part, 9);
}
else if (ret == SQLITE_DONE) {
/* no records */
Expand Down