git-hulk opened a new issue, #2511:
URL: https://github.com/apache/kvrocks/issues/2511

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/kvrocks/issues) and found no similar issues.
   
   
   ### Version
   
   unstable
   
   ### Minimal reproduce step
   
   It requires the `db.tmp` directory to be empty while restoring DB, or it 
will fail to rename the new db dir to the existing one. For the current 
implementation, the db. tmp is potentially unclear if restoring the db failed 
in the middle way.
   
   So we can make the following improvements:
   
   1. Make sure the temporary directory should be cleared before returning
   2. Check if the error is not empty while renaming the new DB, if yes then 
remove the `db.tmp` and have a try again
   
   ### What did you expect to see?
   
   Restoring the db normally
   
   ### What did you see instead?
   
   ![Uploading image.png…]()
   
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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]

Reply via email to