post workers: Fix skipped handling
This commit is contained in:
parent
4682e72cf4
commit
82c9e72aab
7
extern/sector-storage/manager_post.go
vendored
7
extern/sector-storage/manager_post.go
vendored
@ -162,14 +162,14 @@ func (m *Manager) generateWindowPoSt(ctx context.Context, minerID abi.ActorID, s
|
|||||||
}
|
}
|
||||||
|
|
||||||
p, sk, err := m.generatePartitionWindowPost(cctx, spt, ppt, minerID, int(partIdx), sectors, randomness)
|
p, sk, err := m.generatePartitionWindowPost(cctx, spt, ppt, minerID, int(partIdx), sectors, randomness)
|
||||||
if err != nil {
|
|
||||||
retErr = multierror.Append(retErr, xerrors.Errorf("partitionCount:%d err:%+v", partIdx, err))
|
|
||||||
if len(sk) > 0 {
|
if len(sk) > 0 {
|
||||||
log.Errorf("generateWindowPost groupCount:%d, skipped:%d, err: %+v", partIdx, len(sk), err)
|
log.Errorf("generateWindowPost part:%d, skipped:%d, err: %+v", partIdx, len(sk), err)
|
||||||
flk.Lock()
|
flk.Lock()
|
||||||
skipped = append(skipped, sk...)
|
skipped = append(skipped, sk...)
|
||||||
flk.Unlock()
|
flk.Unlock()
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
retErr = multierror.Append(retErr, xerrors.Errorf("partitionCount:%d err:%+v", partIdx, err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,6 @@ func (m *Manager) generateWindowPoSt(ctx context.Context, minerID abi.ActorID, s
|
|||||||
|
|
||||||
if len(skipped) > 0 {
|
if len(skipped) > 0 {
|
||||||
log.Warnf("GenerateWindowPoSt get skipped: %d", len(skipped))
|
log.Warnf("GenerateWindowPoSt get skipped: %d", len(skipped))
|
||||||
return out, skipped, retErr
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out = append(out, *postProofs)
|
out = append(out, *postProofs)
|
||||||
|
10
extern/sector-storage/worker_local.go
vendored
10
extern/sector-storage/worker_local.go
vendored
@ -560,7 +560,7 @@ func (l *LocalWorker) GenerateWindowPoSt(ctx context.Context, ppt abi.Registered
|
|||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
wg.Add(len(sectors))
|
wg.Add(len(sectors))
|
||||||
|
|
||||||
vproofs := make([][]byte, len(sectors))
|
vproofs := make([][]byte, 0, len(sectors))
|
||||||
|
|
||||||
for i, s := range sectors {
|
for i, s := range sectors {
|
||||||
go func(i int, s storiface.PostSectorChallenge) {
|
go func(i int, s storiface.PostSectorChallenge) {
|
||||||
@ -575,18 +575,14 @@ func (l *LocalWorker) GenerateWindowPoSt(ctx context.Context, ppt abi.Registered
|
|||||||
Number: s.SectorNumber,
|
Number: s.SectorNumber,
|
||||||
})
|
})
|
||||||
slk.Unlock()
|
slk.Unlock()
|
||||||
log.Errorf("get sector: %d, vanilla: %s, offset: %d", s.SectorNumber, vanilla)
|
log.Errorf("get sector: %d, vanilla: %s, err: %s", s.SectorNumber, vanilla, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
vproofs[i] = vanilla
|
vproofs = append(vproofs, vanilla)
|
||||||
}(i, s)
|
}(i, s)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
if len(skipped) > 0 {
|
|
||||||
panic("todo") // big TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
res, err := sb.GenerateWindowPoStWithVanilla(ctx, ppt, mid, randomness, vproofs, partitionIdx)
|
res, err := sb.GenerateWindowPoStWithVanilla(ctx, ppt, mid, randomness, vproofs, partitionIdx)
|
||||||
|
|
||||||
return storiface.WindowPoStResult{
|
return storiface.WindowPoStResult{
|
||||||
|
Loading…
Reference in New Issue
Block a user