mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Merge pull request #871 from molecula/bluegreen_verify
blue_green verify accepts empty fragments
This commit is contained in:
commit
ba2851229d
1 changed files with 6 additions and 2 deletions
|
|
@ -731,7 +731,7 @@ func (dbs *DBShard) populateBlueFromGreen() (err error) {
|
|||
citer, _, err := readtx.ContainerIterator(dbs.Index, field, view, dbs.Shard, 0)
|
||||
if err != nil {
|
||||
// might be an empty fragment. If so, let's not freak out.
|
||||
if strings.HasPrefix(err.Error(), "fragment not found") {
|
||||
if strings.Contains(err.Error(), "fragment not found") {
|
||||
continue
|
||||
} else {
|
||||
return errors.Wrap(err, "DBShard.populateBlueFromGreen readtx.ContainerIterator")
|
||||
|
|
@ -782,7 +782,11 @@ func (dbs *DBShard) verifyBlueEqualsGreen() (err error) {
|
|||
view := vw.name
|
||||
gCiter, _, err := greentx.ContainerIterator(dbs.Index, field, view, dbs.Shard, 0)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "DBShard.verifyBlueEqualsGreen greentx.ContainerIterator")
|
||||
if strings.Contains(err.Error(), "fragment not found") {
|
||||
continue
|
||||
} else {
|
||||
return errors.Wrap(err, "DBShard.verifyBlueEqualsGreen greentx.ContainerIterator")
|
||||
}
|
||||
}
|
||||
|
||||
bCiter, _, err := bluetx.ContainerIterator(dbs.Index, field, view, dbs.Shard, 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue