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

feat: refactor stats method in wal #1098

Merged
merged 4 commits into from
Jul 24, 2023

Conversation

Rachelint
Copy link
Contributor

@Rachelint Rachelint commented Jul 22, 2023

Rationale

Although get_statistic method exist in WalManager, it print so less message and just impl in RocksDB wal.
In this pr, I impl this method in all wal impls, and print the detail inner infos through it.

The output example(RocksDB wal):

[Data wal stats]:
#RocksDB stats:
#Wal stats:
TableUnit { id: 2199023255724, next_sequence_num: 59 }
TableUnit { id: 2199023255777, next_sequence_num: 50 }
TableUnit { id: 2199023255627, next_sequence_num: 50 }
...

------------------------------------------------------

[Manifest wal stats]:
#RocksDB stats:
#Wal stats:
TableUnit { id: 2199023255739, next_sequence_num: 2 }
TableUnit { id: 2199023255669, next_sequence_num: 2 }
TableUnit { id: 2199023255740, next_sequence_num: 2 }
...

Detailed Changes

Impl and improve the get_statistic method in WalManager.

Test Plan

Test manually.

wal/src/manager.rs Outdated Show resolved Hide resolved
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Rachelint Rachelint merged commit e6ba03a into apache:main Jul 24, 2023
6 checks passed
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.

None yet

3 participants