Skip to content
Open
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
19 changes: 19 additions & 0 deletions src/redis_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ DEFINE_string(txlog_rocksdb_cloud_endpoint_url,
DEFINE_string(txlog_rocksdb_cloud_sst_file_cache_size,
"1GB",
"Local sst cache size for txlog");
DEFINE_string(txlog_rocksdb_cloud_s3_url,
"",
"TxLog RocksDB cloud S3 URL. Format: s3://{bucket}/{path} or "
"http(s)://{host}:{port}/{bucket}/{path}. "
"Examples: s3://my-bucket/my-path, "
"http://localhost:9000/my-bucket/my-path. "
"This option takes precedence over legacy configuration options "
"if both are provided");
#endif
#ifdef WITH_CLOUD_AZ_INFO
DEFINE_string(txlog_rocksdb_cloud_prefer_zone,
Expand Down Expand Up @@ -1697,6 +1705,16 @@ bool RedisServiceImpl::InitTxLogService(
? FLAGS_aws_secret_key
: config_reader.GetString("store", "aws_secret_key", "");
#endif /* LOG_STATE_TYPE_RKDB_S3 */

// Get the S3 URL configuration (new style)
txlog_rocksdb_cloud_config.s3_url_ =
!CheckCommandLineFlagIsDefault("txlog_rocksdb_cloud_s3_url")
? FLAGS_txlog_rocksdb_cloud_s3_url
: config_reader.GetString("local",
"txlog_rocksdb_cloud_s3_url",
FLAGS_txlog_rocksdb_cloud_s3_url);

// Get legacy configuration
txlog_rocksdb_cloud_config.endpoint_url_ =
!CheckCommandLineFlagIsDefault("txlog_rocksdb_cloud_endpoint_url")
? FLAGS_txlog_rocksdb_cloud_endpoint_url
Expand Down Expand Up @@ -1783,6 +1801,7 @@ bool RedisServiceImpl::InitTxLogService(
txlog_rocksdb_cloud_config.log_purger_starting_second_ =
log_purger_tm.tm_sec;
}

if (FLAGS_bootstrap)
{
log_server_ = std::make_unique<::txlog::LogServer>(
Expand Down