incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

fix(server): ensure graph clear API does not clear meta table for hbase

Open LYD031106 opened this issue 1 year ago • 2 comments

Purpose of the PR

Main Changes

The PR fixes the issue where the graph clear API mistakenly clears the meta table in Hbase backend storage.

Verifying these changes

  • [ ] Trivial rework / code cleanup without any test coverage. (No Need)
  • [ ] Already covered by existing tests, such as (please modify tests here).
  • [ ] Need tests and can be verified as follows:
    • xxx

Does this PR potentially affect the following parts?

  • [ ] Dependencies (add/update license info & regenerate_known_dependencies.sh)
  • [ ] Modify configurations
  • [ ] The public API
  • [ ] Other affects (typed here)
  • [ ] Nope

Documentation Status

  • [ ] Doc - TODO
  • [ ] Doc - Done
  • [ ] Doc - No Need

LYD031106 avatar Nov 16 '25 07:11 LYD031106

Codecov Report

:x: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 31.89%. Comparing base (37be6cd) to head (aa5a973).

Files with missing lines Patch % Lines
...ache/hugegraph/backend/store/hbase/HbaseStore.java 0.00% 5 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (37be6cd) and HEAD (aa5a973). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (37be6cd) HEAD (aa5a973)
4 1
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2911      +/-   ##
============================================
- Coverage     39.38%   31.89%   -7.50%     
- Complexity      456      488      +32     
============================================
  Files           812      801      -11     
  Lines         68660    67513    -1147     
  Branches       8968     8771     -197     
============================================
- Hits          27044    21533    -5511     
- Misses        38824    43579    +4755     
+ Partials       2792     2401     -391     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jan 14 '26 03:01 codecov[bot]

@imbajin In the current CI/CD process, when a test task starts, backend server instance (such as memory, MySQL, HBase, etc.) is installed and launched. Recent PRs #2911 and #2888 have introduced test cases targeted at specific backends (e.g., MySQL or HBase).

However, when the CI/CD job is configured to run with the memory backend, no MySQL or HBase instances are actually launched in the environment. This causes the test cases that depend on those specific backends to fail.

The current fix is to use the Assume mechanism in the relevant test methods. Before executing a test, it checks the type of backend currently running. If the backend does not meet the test's requirements, the test is skipped, preventing build failures due to environment mismatch.

Is this solution appropriate, and are there any best practices for current projects?

LYD031106 avatar Jan 14 '26 04:01 LYD031106