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

fix: can't print log because the tracing guard is dropped #4005

Merged
merged 2 commits into from
May 22, 2024

Conversation

zyy17
Copy link
Collaborator

@zyy17 zyy17 commented May 21, 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?

The bug is caused by #3981.

It's a fast fix for adding guard in Instance to avoid dropping.

I think the elegant way to resolve the problem is to refactor the init_global_logging(), split it into multiple functions, and initialize it at the beginning of main().

We should release the new version of db after the PR is merged. Fortunately, it's not in the v0.8.0.

Checklist

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

@zyy17 zyy17 requested a review from a team as a code owner May 21, 2024 11:00
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label May 21, 2024
src/cmd/src/cli.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 21, 2024

Codecov Report

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

Project coverage is 85.20%. Comparing base (4778575) to head (8c5efe2).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4005      +/-   ##
==========================================
- Coverage   85.50%   85.20%   -0.30%     
==========================================
  Files         977      977              
  Lines      169344   169360      +16     
==========================================
- Hits       144793   144304     -489     
- Misses      24551    25056     +505     

@zyy17 zyy17 force-pushed the fix/log-init-guard-drop branch 2 times, most recently from f73bb8b to dddb50f Compare May 21, 2024 11:36
@WenyXu
Copy link
Member

WenyXu commented May 21, 2024

Let's run make fmt

@zyy17 zyy17 requested a review from tisonkun May 21, 2024 14:11
@WenyXu WenyXu requested a review from waynexia May 22, 2024 02:58
@waynexia waynexia added this pull request to the merge queue May 22, 2024
Merged via the queue into GreptimeTeam:main with commit b86d79b May 22, 2024
28 checks passed
@zyy17 zyy17 deleted the fix/log-init-guard-drop branch May 26, 2024 10:30
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.

5 participants