mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Merge pull request #803 from molecula/fgen_refined
refine our f.gen nil handling to support blue/green
This commit is contained in:
commit
1994560cf6
1 changed files with 10 additions and 4 deletions
14
fragment.go
14
fragment.go
|
|
@ -638,8 +638,11 @@ func (f *fragment) setBit(tx Tx, rowID, columnID uint64) (changed bool, err erro
|
|||
if f.gen != nil {
|
||||
err = f.gen.Transaction(wp, doSetFunc)
|
||||
} else {
|
||||
panic("internal error: f.gen was nil. should never happen under roaring b/c storage should be open")
|
||||
//err = doSetFunc()
|
||||
if tx.Type() == RoaringTxn {
|
||||
panic("internal error: f.gen was nil. should never happen under roaring b/c storage should be open")
|
||||
}
|
||||
// else blue green or transactional backend. Just do it.
|
||||
err = doSetFunc()
|
||||
}
|
||||
return changed, err
|
||||
}
|
||||
|
|
@ -2342,8 +2345,11 @@ func (f *fragment) importPositions(tx Tx, set, clear []uint64, rowSet map[uint64
|
|||
if f.gen != nil {
|
||||
err = f.gen.Transaction(wp, doFunc)
|
||||
} else {
|
||||
panic("internal error: 2nd place, f.gen was nil. should never happen under roaring b/c storage should be open")
|
||||
//err = doFunc()
|
||||
if tx.Type() == RoaringTxn {
|
||||
panic("internal error: 2nd place, f.gen was nil. should never happen under roaring b/c storage should be open")
|
||||
}
|
||||
// else blue green or transactional backend. Just do it.
|
||||
err = doFunc()
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue