fix bigint overflow bug
This commit is contained in:
parent
87cb6f67f1
commit
84d9dc5dfe
@ -1282,8 +1282,6 @@ func (i *Index) StorageInfo(ctx context.Context, id storiface.ID) (storiface.Sto
|
||||
i.lk.RLock()
|
||||
defer i.lk.RUnlock()
|
||||
|
||||
log.Errorf("StorageInfo called id: ", id)
|
||||
|
||||
si, found := i.stores[id]
|
||||
if !found {
|
||||
return storiface.StorageInfo{}, xerrors.Errorf("sector store not found")
|
||||
@ -1341,7 +1339,7 @@ func (dbi *DBIndex) StorageBestAlloc(ctx context.Context, allocate storiface.Sec
|
||||
where %s and available >= $1
|
||||
and NOW()-last_heartbeat < $2
|
||||
and heartbeat_err is null
|
||||
order by available * weight desc`, checkString)
|
||||
order by (available::numeric * weight) desc`, checkString)
|
||||
err = dbi.harmonyDB.Select(ctx, &rows,
|
||||
sql, spaceReq, SkippedHeartbeatThresh)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user