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

feat(tianmu): remove DBUG_OFF and repalce DEBUG_ASSERT with assert #1751

Merged

Conversation

duanjr
Copy link
Contributor

@duanjr duanjr commented May 8, 2023

Summary about this PR

feat: remove DBUG_OFF flag and repalce DEBUG_ASSERT with assert in tianmu engine(#1551)

1.Remove the code segment in common/assert.h

#ifdef DBUG_OFF
#define DEBUG_ASSERT(condition) \
  do {                          \
  } while (false)
#else
#define DEBUG_ASSERT(...) assert(__VA_ARGS__)
#endif

2.Automatically replace DBUG_ASSERT with assert in all files under tianmu directory.

3.Manually adjust indent in core/query.cpp and optimizer/compile/descriptor.cpp

[Edited]4.Automatically update fomat use clang-format after first check failed.

Tests Check List

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Changelog

  • New Feature
  • Bug Fix
  • Performance Improvement
  • Build/Testing/CI/CD
  • Documentation
  • Not for changelog (changelog entry is not required)

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features

@mergify
Copy link
Contributor

mergify bot commented May 8, 2023

This pull request's title should follow requirements next. @duanjr please check it 👇.

Valid format:

fix(vc): fix sth..... (#3306)
  ^         ^---------^  ^----^
  |         |            |
  |         +            +-> you issue id.
  |         |
  |         +-> Summary in present tense.
  |
  +-------> Type: feat, fix, docs, workflow, style, refactor, test, website, chore

Valid types:

  • feat: new feature for stonedb
  • fix: bug fix for stonedb
  • docs: changes to the documentation
  • workflow: ci/cd in .github
  • perf: Changes to improve code performance
  • refactor: refactoring production code, eg. renaming a variable
  • style: formatting, missing semi colons, etc; no production code change
  • test: adding missing tests, refactoring tests; no production code change
  • website
  • chore: updating grunt tasks etc; no production code change

@mergify
Copy link
Contributor

mergify bot commented May 8, 2023

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@Nliver Nliver requested review from RingsC and adofsauron May 9, 2023 01:36
@Nliver Nliver requested a review from konghaiya May 9, 2023 01:41
@Nliver Nliver added this to the StoneDB_5.7_v1.0.4 milestone May 9, 2023
@Nliver Nliver changed the title feature: remove DBUG_OFF and repalce DEBUG_ASSERT with assert feat(tianmu): remove DBUG_OFF and repalce DEBUG_ASSERT with assert May 9, 2023
@mergify mergify bot added the PR-feature feature for pull request label May 9, 2023
@hustjieke
Copy link
Collaborator

Greate job!

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 45.45% and project coverage change: +0.02 🎉

Comparison is base (74b5b05) 55.18% compared to head (7d06683) 55.20%.

❗ Current head 7d06683 differs from pull request most recent head 28647ad. Consider uploading reports for the commit 28647ad to get more accurate results

Additional details and impacted files
@@                 Coverage Diff                 @@
##           stonedb-5.7-dev    #1751      +/-   ##
===================================================
+ Coverage            55.18%   55.20%   +0.02%     
===================================================
  Files                 2031     2031              
  Lines               431436   431424      -12     
===================================================
+ Hits                238081   238181     +100     
+ Misses              193355   193243     -112     
Impacted Files Coverage Δ
storage/tianmu/compress/basic_data_filt.cpp 45.03% <0.00%> (ø)
storage/tianmu/compress/data_stream.h 62.90% <ø> (ø)
storage/tianmu/compress/dictionary.h 26.61% <0.00%> (ø)
storage/tianmu/compress/inc_alloc.cpp 26.41% <ø> (ø)
storage/tianmu/compress/inc_alloc.h 6.66% <ø> (ø)
storage/tianmu/compress/inc_wgraph.cpp 2.19% <ø> (ø)
storage/tianmu/compress/inc_wgraph.h 5.88% <ø> (ø)
storage/tianmu/compress/ppm.cpp 0.00% <ø> (ø)
storage/tianmu/compress/suffix_tree.cpp 0.00% <0.00%> (ø)
storage/tianmu/compress/text_compressor.cpp 13.33% <ø> (ø)
... and 125 more

... and 47 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@hustjieke hustjieke left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@hustjieke hustjieke left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot merged commit 72a160c into stoneatom:stonedb-5.7-dev May 18, 2023
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-feature feature for pull request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants