Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the interpretation of log_stop_retaining_min_disk_mb #21885

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/preview/reference/configuration/yb-tserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ Default: `86400`

Stop retaining logs if the space available for the logs falls below this limit, specified in megabytes. As with `log_max_seconds_to_retain`, this flag is ignored if a log segment contains unflushed entries.

Default: `102400`
Default: `100`

##### --enable_truncate_cdcsdk_table

Expand Down
2 changes: 1 addition & 1 deletion docs/content/stable/reference/configuration/yb-tserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ Default: `86400`

Stop retaining logs if the space available for the logs falls below this limit, specified in megabytes. As with `log_max_seconds_to_retain`, this flag is ignored if a log segment contains unflushed entries.

Default: `102400`
Default: `100`

##### --enable_truncate_cdcsdk_table

Expand Down
2 changes: 1 addition & 1 deletion docs/content/v2.14/reference/configuration/yb-tserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ Default: `86400`

Stop retaining logs if the space available for the logs falls below this limit, specified in megabytes. As with `log_max_seconds_to_retain`, this flag is ignored if a log segment contains unflushed entries.

Default: `102400`
Default: `100`

##### --stream_truncate_record

Expand Down
2 changes: 1 addition & 1 deletion docs/content/v2.16/reference/configuration/yb-tserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ Default: `86400`

Stop retaining logs if the space available for the logs falls below this limit, specified in megabytes. As with `log_max_seconds_to_retain`, this flag is ignored if a log segment contains unflushed entries.

Default: `102400`
Default: `100`

##### --enable_truncate_cdcsdk_table

Expand Down
2 changes: 1 addition & 1 deletion docs/content/v2.18/reference/configuration/yb-tserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ Default: `86400`

Stop retaining logs if the space available for the logs falls below this limit, specified in megabytes. As with `log_max_seconds_to_retain`, this flag is ignored if a log segment contains unflushed entries.

Default: `102400`
Default: `100`

##### --enable_truncate_cdcsdk_table

Expand Down
4 changes: 2 additions & 2 deletions src/yb/consensus/log_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ DEFINE_UNKNOWN_int32(log_max_seconds_to_retain, 24 * 3600, "Log files that are o
"ignored. This flag is ignored if a log segment contains entries that haven't been"
"flushed to RocksDB.");

DEFINE_UNKNOWN_int64(log_stop_retaining_min_disk_mb, 100 * 1024, "Stop retaining logs if the space "
DEFINE_UNKNOWN_int64(log_stop_retaining_min_disk_mb, 100, "Stop retaining logs if the space "
"available for the logs falls below this limit. This flag is ignored if a log segment "
"contains unflushed entries.");

Expand Down Expand Up @@ -275,7 +275,7 @@ bool LogReader::ViolatesMinSpacePolicy(const scoped_refptr<ReadableLogSegment>&
} else {
uint64_t free_space = *free_space_result;
if (free_space + *potential_reclaimed_space <
implicit_cast<size_t>(FLAGS_log_stop_retaining_min_disk_mb) * 1024) {
implicit_cast<size_t>(FLAGS_log_stop_retaining_min_disk_mb) * 1024 * 1024) {
YB_LOG_EVERY_N_SECS(WARNING, 300)
<< "Segment " << segment->path() << " violates minimum free space policy "
<< "specified by log_stop_retaining_min_disk_mb: "
Expand Down