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

fix: skip wal encoding when data wal is disabled #1401

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

jiacai2050
Copy link
Contributor

Rationale

When data wal is disable, data is still encoded, which waste cpu usage.

Detailed Changes

Skip encode when data wal is disabled.

Test Plan

CI.

encode_ctx.encode(&self.instance.wal_encode, &schema)?
};
let seq = if self.instance.disable_wal {
MIN_SEQUENCE_NUMBER
Copy link
Member

Choose a reason for hiding this comment

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

The real sequence number should be returned, otherwise the merge procedure may not work with the mock one.

@jiacai2050 jiacai2050 force-pushed the fix-disable-wal branch 3 times, most recently from e64719c to 815c008 Compare December 26, 2023 02:06
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. And I guess we can remove codes for disabling wal writes in the wal manager.

@jiacai2050 jiacai2050 merged commit 3359a9a into apache:dev Dec 27, 2023
6 checks passed
@jiacai2050 jiacai2050 deleted the fix-disable-wal branch December 27, 2023 04:25
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.

2 participants