[Github PR] support modify clog size with parameters
This commit is contained in:
@ -426,7 +426,7 @@ int ObLogWriteFilePool::update_free_quota(const char* path, const int64_t percen
|
|||||||
} else if (OB_FAIL(get_total_used_size(used_size))) {
|
} else if (OB_FAIL(get_total_used_size(used_size))) {
|
||||||
ret = OB_IO_ERROR;
|
ret = OB_IO_ERROR;
|
||||||
COMMON_LOG(ERROR, "get_total_used_size fail", K(ret));
|
COMMON_LOG(ERROR, "get_total_used_size fail", K(ret));
|
||||||
} else if(OB_FAIL(calculate_free_quota(path, used_size, percent, limit_percent))){
|
} else if (OB_FAIL(calculate_free_quota(path, used_size, percent, limit_percent))){
|
||||||
ret = OB_IO_ERROR;
|
ret = OB_IO_ERROR;
|
||||||
CLOG_LOG(ERROR, "calculate free quota error", K(ret), K(path), K(errno), KERRMSG);
|
CLOG_LOG(ERROR, "calculate free quota error", K(ret), K(path), K(errno), KERRMSG);
|
||||||
}
|
}
|
||||||
@ -457,10 +457,10 @@ int ObLogWriteFilePool::calculate_free_quota(const char* path, const int64_t use
|
|||||||
if (OB_UNLIKELY(0 != statvfs(path, &svfs))) {
|
if (OB_UNLIKELY(0 != statvfs(path, &svfs))) {
|
||||||
ret = OB_IO_ERROR;
|
ret = OB_IO_ERROR;
|
||||||
CLOG_LOG(ERROR, "statvfs error", K(ret), K(path), K(errno), KERRMSG);
|
CLOG_LOG(ERROR, "statvfs error", K(ret), K(path), K(errno), KERRMSG);
|
||||||
} else{
|
} else {
|
||||||
if (log_disk_size != 0){
|
if (log_disk_size != 0) {
|
||||||
total_size = log_disk_size;
|
total_size = log_disk_size;
|
||||||
}else{
|
} else {
|
||||||
total_size = (int64_t)svfs.f_bsize * (int64_t)svfs.f_blocks;
|
total_size = (int64_t)svfs.f_bsize * (int64_t)svfs.f_blocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -492,7 +492,9 @@ bool ObConfigLogDiskSizeChecker::check(const ObConfigItem& t) const
|
|||||||
const int64_t total_disk_size = (int64_t)svfs.f_bsize * (int64_t)svfs.f_blocks;
|
const int64_t total_disk_size = (int64_t)svfs.f_bsize * (int64_t)svfs.f_blocks;
|
||||||
is_valid = (log_disk_size <= total_disk_size);
|
is_valid = (log_disk_size <= total_disk_size);
|
||||||
if (!is_valid) {
|
if (!is_valid) {
|
||||||
OB_LOG(ERROR,"log_disk_size is greater than total disk size.", K(log_disk_size), K(total_disk_size));
|
OB_LOG(ERROR,"log_disk_size is greater than total disk size.",
|
||||||
|
K(log_disk_size),
|
||||||
|
K(total_disk_size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,6 +151,7 @@ location_refresh_thread_count
|
|||||||
log_archive_batch_buffer_limit
|
log_archive_batch_buffer_limit
|
||||||
log_archive_checkpoint_interval
|
log_archive_checkpoint_interval
|
||||||
log_archive_concurrency
|
log_archive_concurrency
|
||||||
|
log_disk_size
|
||||||
log_restore_concurrency
|
log_restore_concurrency
|
||||||
major_compact_trigger
|
major_compact_trigger
|
||||||
major_freeze_duty_time
|
major_freeze_duty_time
|
||||||
|
|||||||
@ -33,4 +33,3 @@ config:
|
|||||||
enable_merge_by_turn: 'FALSE'
|
enable_merge_by_turn: 'FALSE'
|
||||||
syslog_io_bandwidth_limit: '10G'
|
syslog_io_bandwidth_limit: '10G'
|
||||||
enable_async_syslog: 'FALSE'
|
enable_async_syslog: 'FALSE'
|
||||||
log_disk_size: '30G'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user