File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,15 @@ func (cs *CommitStore) Rollback(targetVersion int64) error {
68
68
return nil
69
69
}
70
70
71
- func (cs * CommitStore ) LoadVersion (targetVersion int64 , createNew bool ) (types.Committer , error ) {
71
+ // copyExisting is for creating new memiavl object given existing folder
72
+ func (cs * CommitStore ) LoadVersion (targetVersion int64 , copyExisting bool ) (types.Committer , error ) {
72
73
opts := cs .opts
73
- opts .ReadOnly = createNew
74
+ opts .ReadOnly = copyExisting
74
75
db , err := memiavl .OpenDB (cs .logger , targetVersion , opts )
75
76
if err != nil {
76
77
return nil , err
77
78
}
78
- if createNew {
79
+ if copyExisting {
79
80
return & CommitStore {
80
81
logger : cs .logger ,
81
82
db : db ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ type Committer interface {
23
23
24
24
LastCommitInfo () * proto.CommitInfo
25
25
26
- LoadVersion (targetVersion int64 , createNew bool ) (Committer , error )
26
+ LoadVersion (targetVersion int64 , copyExisting bool ) (Committer , error )
27
27
28
28
Rollback (targetVersion int64 ) error
29
29
You can’t perform that action at this time.
0 commit comments