-
Notifications
You must be signed in to change notification settings - Fork 308
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(puffin): introduce puffin manager trait #4195
Conversation
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
WalkthroughThis update introduces a new module Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant PuffinManager
participant PuffinWriter
participant PuffinReader
Client->>+PuffinManager: create writer()
PuffinManager->>+PuffinWriter: initialize
PuffinWriter-->>-PuffinManager: writer instance
Client->>+PuffinWriter: put_blob(data, options)
PuffinWriter-->>-Client: confirmation
Client->>+PuffinWriter: finalize()
PuffinWriter-->>-Client: EOF
Client->>+PuffinManager: create reader()
PuffinManager->>+PuffinReader: initialize
PuffinReader-->>-PuffinManager: reader instance
Client->>+PuffinReader: read_blob(key)
PuffinReader-->>-Client: data
Possibly related issues
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (1)
src/puffin/src/puffin_manager.rs (1)
23-34
: Consider enhancing the documentation forPuffinManager
.The current documentation is minimal. Providing more detailed descriptions of what constitutes a
PuffinReader
andPuffinWriter
, and how they interact withpuffin_file_name
could improve clarity and usability.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/puffin/src/lib.rs (1 hunks)
- src/puffin/src/puffin_manager.rs (1 hunks)
Files skipped from review due to trivial changes (1)
- src/puffin/src/lib.rs
Additional comments not posted (1)
src/puffin/src/puffin_manager.rs (1)
62-73
: Validate the error handling inPuffinReader
.Ensure that the error handling strategy in
blob
anddir
methods is robust, especially considering they interact with file systems which are prone to various errors.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4195 +/- ##
==========================================
- Coverage 85.11% 84.81% -0.30%
==========================================
Files 1028 1028
Lines 180903 180903
==========================================
- Hits 153970 153436 -534
- Misses 26933 27467 +534 |
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
#4193
What's changed and what's your intention?
Add
PuffinManager
to unify puffin file reading and writing blob and directoryChecklist