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
2 changes: 2 additions & 0 deletions be/src/cloud/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ DEFINE_mInt32(mow_stream_load_commit_retry_times, "5");

DEFINE_mBool(save_load_error_log_to_s3, "false");

DEFINE_mBool(use_public_endpoint_for_error_log, "true");

DEFINE_mInt32(sync_load_for_tablets_thread, "32");

DEFINE_mBool(enable_new_tablet_do_compaction, "true");
Expand Down
3 changes: 3 additions & 0 deletions be/src/cloud/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ DECLARE_mInt32(mow_stream_load_commit_retry_times);

DECLARE_mBool(save_load_error_log_to_s3);

// Whether to use public endpoint for error log presigned URL
DECLARE_mBool(use_public_endpoint_for_error_log);

// the theads which sync the datas which loaded in other clusters
DECLARE_mInt32(sync_load_for_tablets_thread);

Expand Down
7 changes: 4 additions & 3 deletions be/src/runtime/runtime_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,10 @@ std::string RuntimeState::get_error_log_file_path() {
}
// expiration must be less than a week (in seconds) for presigned url
static const unsigned EXPIRATION_SECONDS = 7 * 24 * 60 * 60 - 1;
// We should return a public endpoint to user.
_error_log_file_path = _s3_error_fs->generate_presigned_url(_s3_error_log_file_path,
EXPIRATION_SECONDS, true);
// Use public or private endpoint based on configuration
_error_log_file_path =
_s3_error_fs->generate_presigned_url(_s3_error_log_file_path, EXPIRATION_SECONDS,
config::use_public_endpoint_for_error_log);
}
return _error_log_file_path;
}
Expand Down
Loading