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

Problem: changeset verify command return wrong app-hash on old blocks #985

Merged
merged 12 commits into from
Apr 20, 2023
Prev Previous commit
Next Next commit
ignore non-exist stores
  • Loading branch information
yihuang committed Apr 20, 2023
commit 0d744b98cdcbfead2de56df1c50150cc06a16882
6 changes: 6 additions & 0 deletions versiondb/client/convert_to_sst.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func convertSingleStore(store string, changeSetDir, sstDir string, sstFileSize u
if err != nil {
return err
}
if len(csFiles) == 0 {
return nil
}

prefix := []byte(fmt.Sprintf(tsrocksdb.StorePrefixTpl, store))
isEmpty := true
Expand Down Expand Up @@ -179,6 +182,9 @@ func scanChangeSetFiles(changeSetDir, store string) ([]FileWithVersion, error) {
storeDir := filepath.Join(changeSetDir, store)
entries, err := os.ReadDir(storeDir)
if err != nil {
if os.IsNotExist(err) {
return nil, nil
}
return nil, err
}
fileNames := make([]string, len(entries))
Expand Down