Conversation
Summary of ChangesHello @lidezhu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the event store's configuration by introducing an explicit option to enable or disable Zstd compression for large data values. This change provides greater flexibility for users to manage storage efficiency and performance characteristics based on their specific deployment needs, ensuring that compression can be toggled without altering the compression threshold. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
📝 WalkthroughWalkthroughThe changes introduce a feature flag to conditionally enable zstd compression in the event store. A new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a configuration flag enable-zstd-compression to control zstd compression in the event store. The changes include adding the flag to the configuration files, propagating it to the eventStore struct, and using it to conditionally apply compression. A new test is also added to verify the behavior when compression is disabled. The implementation is straightforward and correct. I have one suggestion to improve the robustness of the new test case.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/config/debug.go`:
- Around line 85-100: The EventStoreConfig.EnableZstdCompression field must be
changed to a pointer (*bool) so you can distinguish omitted vs explicit false
during json/toml unmarshal; update the struct type in EventStoreConfig and set a
pointer default in NewDefaultEventStoreConfig (allocate a bool true and assign
its address), then in DebugConfig.ValidateAndAdjust() check if
c.EventStore.EnableZstdCompression == nil and, if so, allocate and assign the
default true pointer so partial configs receive the intended default.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
logservice/eventstore/event_store.gologservice/eventstore/event_store_test.gopkg/config/debug.goserver.toml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@logservice/eventstore/event_store_test.go`:
- Around line 904-906: Line with "value :=" is not indented to match the
surrounding tab-indented block (between "key := []byte(\"large-key\")" and
"entry := common.RawKVEntry"), which breaks gofmt/gci; fix it by adding the same
leading tab indentation as the other statements so "value := bytes.Repeat(...)"
aligns with "key :=" and "entry :=", keeping the rest of the test unchanged.
|
/test all |
|
/run-check-issue-tirage-complete |
|
@lidezhu: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/run-check-issue-tirage-complete |
|
/retest |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: asddongmen The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #4257
What is changed and how it works?
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
Summary by CodeRabbit