mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 23:31:03 +00:00
Merge branch 'tds' of github.com:tgruben/privilosa into tds
This commit is contained in:
commit
e46a41638f
2 changed files with 10 additions and 4 deletions
|
|
@ -484,7 +484,7 @@ func (per *DBPerShard) DeleteFieldFromStore(index, field, fieldPath string) (err
|
|||
per.Mu.Lock()
|
||||
defer func() {
|
||||
if fieldPath != "" {
|
||||
panicOn(os.RemoveAll(fieldPath))
|
||||
_ = os.RemoveAll(fieldPath)
|
||||
}
|
||||
per.Mu.Unlock()
|
||||
}()
|
||||
|
|
@ -498,11 +498,12 @@ func (per *DBPerShard) DeleteFieldFromStore(index, field, fieldPath string) (err
|
|||
}
|
||||
for _, dbs := range dbi.Shard {
|
||||
for _, w := range dbs.W {
|
||||
err := w.DeleteField(index, field, fieldPath)
|
||||
panicOn(err)
|
||||
if e := w.DeleteField(index, field, fieldPath); e != nil && err == nil {
|
||||
err = errors.Wrap(e, "DeleteFieldFromStore()")
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
func (per *DBPerShard) DeleteFragment(index, field, view string, shard uint64, frag *fragment) error {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,11 @@ func (l *leasedKV) Start(initValue string) error {
|
|||
|
||||
func (l *leasedKV) create(initValue string) (<-chan *clientv3.LeaseKeepAliveResponse, error) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
if l.cancel != nil {
|
||||
l.cancel()
|
||||
}
|
||||
|
||||
l.cancel = cancel
|
||||
|
||||
leaseResp, err := l.cli.Grant(ctx, l.ttlSeconds)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue