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

fileservice: more logs for debugging EOF in Write #21285

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

reusee
Copy link
Contributor

@reusee reusee commented Jan 20, 2025

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #https://github.com/matrixorigin/MO-Cloud/issues/4778

What this PR does / why we need it:

add more logs

@reusee reusee requested a review from fengttt as a code owner January 20, 2025 05:58
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Jan 20, 2025
Copy link
Contributor

@fengttt fengttt left a comment

Choose a reason for hiding this comment

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

Why don't we convert the err to a MoErr? Which we will get log, and stack for free.

@reusee
Copy link
Contributor Author

reusee commented Jan 22, 2025

Why don't we convert the err to a MoErr? Which we will get log, and stack for free.

不行的。转换成其他类型,可能会破坏上层的错误检查。

最好的办法是用 fmt.Errorf 和 %w 来包装错误,用 errors.Is / As 来检查。

不清楚为什么项目禁用 fmt.Errorf,这个完全违背go的最佳实践:https://go.dev/blog/go1.13-errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement size/S Denotes a PR that changes [10,99] lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants