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

revert: set default compresion to LZ4 #4312

Closed
wants to merge 1 commit into from

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Jul 8, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Due to #4304
Reverts #4294

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.

Summary by CodeRabbit

  • Configuration Updates
    • Updated Kafka compression settings from Lz4 to NoCompression for topic management and various configurations.

These changes aim to standardize compression settings across the application, potentially improving consistency and performance.

@WenyXu WenyXu requested review from MichaelScofield and a team as code owners July 8, 2024 02:51
Copy link
Contributor

coderabbitai bot commented Jul 8, 2024

Walkthrough

The overall change involves updating Kafka compression settings in the WAL (Write-Ahead Logging) options. Specifically, the compression type has been changed from Compression::Lz4 to Compression::NoCompression for various configuration files and struct implementations, affecting both default values and specific settings for Kafka and WAL configurations.

Changes

Files Change Summary
src/common/meta/src/wal_options_allocator/kafka/topic_manager.rs Changed Compression::Lz4 to Compression::NoCompression when producing a record in TopicManager.
src/common/wal/src/config.rs Switched Compression::Lz4 to Compression::default() for Kafka and WAL-related configuration fields.
src/common/wal/src/config/kafka/datanode.rs Updated default compression field in DatanodeKafkaConfig from Lz4 to NoCompression.
src/common/wal/src/config/kafka/standalone.rs Modified default compression field in StandaloneKafkaConfig from Lz4 to NoCompression.

Poem

As code evolves in twilight's grace,
The Kafka streams at swifter pace.
From Lz4 to None, we stride,
Compression shifts, we take in stride.
The TopicManagers' work's now light,
In data's flow, we see the light.
🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Jul 8, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 58f991b and e2084d4.

Files selected for processing (4)
  • src/common/meta/src/wal_options_allocator/kafka/topic_manager.rs (1 hunks)
  • src/common/wal/src/config.rs (2 hunks)
  • src/common/wal/src/config/kafka/datanode.rs (1 hunks)
  • src/common/wal/src/config/kafka/standalone.rs (1 hunks)
Additional comments not posted (5)
src/common/wal/src/config/kafka/datanode.rs (1)

49-49: LGTM!

The compression setting in the DatanodeKafkaConfig struct's default implementation has been correctly reverted to Compression::NoCompression.

src/common/wal/src/config/kafka/standalone.rs (1)

70-70: LGTM!

The compression setting in the StandaloneKafkaConfig struct's default implementation has been correctly reverted to Compression::NoCompression.

src/common/wal/src/config.rs (2)

210-210: LGTM!

The compression setting in the DatanodeKafkaConfig struct has been correctly reverted to use Compression::default().


232-232: LGTM!

The compression setting in the StandaloneKafkaConfig struct has been correctly reverted to use Compression::default().

src/common/meta/src/wal_options_allocator/kafka/topic_manager.rs (1)

176-176: LGTM!

The compression setting in the try_append_noop_record function has been correctly reverted to Compression::NoCompression.

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.14%. Comparing base (58f991b) to head (e2084d4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4312      +/-   ##
==========================================
- Coverage   85.15%   85.14%   -0.01%     
==========================================
  Files        1060     1060              
  Lines      187543   187543              
==========================================
- Hits       159693   159689       -4     
- Misses      27850    27854       +4     

@tisonkun
Copy link
Collaborator

tisonkun commented Jul 8, 2024

Somehow we may investigate how to do the compression and avoid stack overflow ... Any ideas why it causes stack overflow?

@evenyag
Copy link
Contributor

evenyag commented Jul 8, 2024

I think we should find the root cause.

@WenyXu
Copy link
Member Author

WenyXu commented Jul 8, 2024

Somehow we may investigate how to do the compression and avoid stack overflow ... Any ideas why it causes stack overflow?

I think we should find the root cause.

Yes, I will investigate it ASAP. However, If we can't find the root cause before releasing the new version, we'd better to revert the PR?

@killme2008
Copy link
Contributor

Already done in #4303

@killme2008 killme2008 closed this Jul 8, 2024
@WenyXu WenyXu deleted the revert-4294-feat/kafka-default-compression branch July 24, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants