-
Notifications
You must be signed in to change notification settings - Fork 597
fix(server): prevent graph clear API from clearing meta table in MySQL backend storage #2888
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
base: release-1.5.0
Are you sure you want to change the base?
Changes from 1 commit
e376b6c
45d95fe
22b2407
d7f35f1
4ad56cb
40e0314
ea75f05
e14eb0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,6 +223,7 @@ public void truncate() { | |
| this.checkOpened(); | ||
|
|
||
| this.truncateTables(); | ||
| this.init(); | ||
|
imbajin marked this conversation as resolved.
Outdated
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The PR description mentions that "HugeGraph only supports hstore, rocksdb, hbase, and memory" but this fix is only applied to MySQL backend. Questions to verify:
Recommendation:
this.truncateTables();
// MySQL-specific: Re-initialize tables to restore meta table
// Other backends handle meta table separately during truncation
this.init();
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Root Cause Analysis by Backend
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@LYD031106 LGTM, we could add a basic test & comment for the above issue (and we could merge this PR soon) BTW, this week we prepare to release the new version (1.7.0)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have submitted a MySQL compatibility fix to the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
refer ci steps: https://github.com/apache/incubator-hugegraph/actions/runs/18783126996/workflow?pr=2888#L49
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Minor: Consider side effects of calling init() The
Observation: Potential issue: Suggestion:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding
Please verify this is the correct approach and consider adding a comment explaining why re-initialization is needed after truncate. |
||
| LOG.debug("Store truncated: {}", this.store); | ||
| } | ||
|
|
||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.