imbajin commented on issue #2209:
URL: 
https://github.com/apache/incubator-hugegraph/issues/2209#issuecomment-3425680782

   > [@imbajin](https://github.com/imbajin) ## Problem Analysis
   > 
   > During testing of the `incubator-hugegraph-toolchain` `dataloader` 
component, it was discovered that the `/graphs/{name}/clear` interface called 
in the `setUp` method clears all data tables, including the `m` table that 
stores version information. This is the root cause of the current bug.
   > 
   > ## Proposed Solutions
   > **Solution 1**: Add compatibility handling for empty tables in the 
`InitStore` method. When it is detected that the version information table is 
empty, automatically write the current version number and return normally, 
thereby allowing the system initialization to complete successfully even after 
the data has been cleared.
   > 
   > **Solution 2**: Modify the `MysqlStore.truncateTables()` method so that 
after clearing all data tables, the `init` method is called again to rewrite 
the necessary version information, ensuring the version table remains in a 
valid state at all times.
   > 
   > Do you have any suggestions regarding these two solutions? Personally, I 
lean towards Solution 2, as it addresses the issue at its source and more 
thoroughly ensures data state consistency
   
   @LYD031106 Solution2 is fine to me in this case (BTW, in the future version 
we’ll use PD to manage the meta-info, and MySQL backend will only keep in the 
legacy version)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to