Skip to content

[server] Allow table-level overrides for log segment/index/flush options#3361

Closed
lilei1128 wants to merge 1 commit into
apache:mainfrom
lilei1128:fix-3315
Closed

[server] Allow table-level overrides for log segment/index/flush options#3361
lilei1128 wants to merge 1 commit into
apache:mainfrom
lilei1128:fix-3315

Conversation

@lilei1128
Copy link
Copy Markdown

Purpose

Linked issue: close #3315

Add five new table-scoped ConfigOptions (table.log.segment.file-size,
table.log.index.file-size, table.log.index.interval-size,
table.log.file-preallocate, table.log.flush.interval-messages) that
override the corresponding cluster-level log.* settings for a single
table when explicitly set. Tables without these properties continue
to use the server-global values unchanged.

Brief change log

  • ConfigOptions: add TABLE_LOG_* options with noDefaultValue() so
    absent values fall back to server config automatically
  • FlussConfigUtils: register all five keys in ALTERABLE_TABLE_OPTIONS
    so ALTER TABLE SET takes effect on the next segment roll
  • TableDescriptorValidation: add overflow guard for
    table.log.segment.file-size (mirrors existing server-level check)
  • LogTablet: add buildEffectiveLogConfig() helper and a new create()
    overload that accepts tableProperties; old overload delegates with
    an empty Configuration for full backward compatibility
  • LogManager: thread tableProperties through getOrCreateLog() and
    loadLog() so both the online and recovery paths honour overrides
  • Replica: pass tableInfo.getProperties() into getOrCreateLog()

Tests

  • LogTabletTest: verify segment roll and auto-flush behaviour with
    table-level overrides vs. server defaults
  • TableDescriptorValidationTest: cover valid values, Integer.MAX_VALUE
    boundary, overflow rejection, and TABLE_OPTIONS registration for
    all five new keys

API and Format

Documentation

@zuston
Copy link
Copy Markdown
Member

zuston commented May 22, 2026

thanks for proposing this. I have submitted the PR #3358 . If you have time, could you help review this?

@lilei1128
Copy link
Copy Markdown
Author

thanks for proposing this. I have submitted the PR #3358 . If you have time, could you help review this?

Thanks for your commit and I will turn off this PR .

@lilei1128 lilei1128 closed this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Respect the log.* config from the table level options

2 participants