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

assign default values to the trash node #4577

Merged
merged 1 commit into from
Mar 26, 2024
Merged

assign default values to the trash node #4577

merged 1 commit into from
Mar 26, 2024

Conversation

zhijian-pro
Copy link
Contributor

If the trash node does not exist, give it a default value.

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 55.65%. Comparing base (346b068) to head (e8e90c1).

Files Patch % Lines
pkg/meta/tkv.go 0.00% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4577      +/-   ##
==========================================
- Coverage   55.66%   55.65%   -0.01%     
==========================================
  Files         158      158              
  Lines       43067    43076       +9     
==========================================
+ Hits        23972    23976       +4     
- Misses      16436    16437       +1     
- Partials     2659     2663       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davies
Copy link
Contributor

davies commented Mar 26, 2024

also sql and redis?

@@ -3323,6 +3323,16 @@ func (m *kvMeta) DumpMeta(w io.Writer, root Ino, keepSecret, fast, skipTrash boo
tree = m.snap[root]
if !skipTrash {
trash = m.snap[TrashInode]
if trash == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

When this happen? It's OK to have no trash.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uniform behavior is for easier testing.

@zhijian-pro
Copy link
Contributor Author

also sql and redis?

Other engines don't have this problem.

@davies davies merged commit b296656 into main Mar 26, 2024
32 checks passed
@davies davies deleted the print-trash-node branch March 26, 2024 07:31
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