mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
short circuit if no data to migrate
This commit is contained in:
parent
d4df15721d
commit
2d55ffbd28
1 changed files with 6 additions and 1 deletions
|
|
@ -1327,7 +1327,12 @@ func (f *TxFactory) green2blue(holder *Holder) (err error) {
|
|||
if err != nil {
|
||||
return errors.Wrap(err, "TxFactory.green2blue f.greenHasData()")
|
||||
}
|
||||
if blueHasData && !greenHasData {
|
||||
if !blueHasData && !greenHasData {
|
||||
holder.Logger.Printf("no data in blue or green. No migration or verification to do.")
|
||||
return nil
|
||||
}
|
||||
// INVAR: blue has data.
|
||||
if !greenHasData {
|
||||
holder.Logger.Printf("error: cannot migrate from green '%v' because it has no data in it.", greenSrc)
|
||||
return fmt.Errorf("error: cannot migrate from green '%v' because it has no data in it.", greenSrc)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue