fix: curio: Update pgx imports, fix db_storage alloc

This commit is contained in:
Łukasz Magiera 2024-04-20 09:39:38 +02:00 committed by Łukasz Magiera
parent 914a65cea6
commit 1b6bffd339
3 changed files with 3 additions and 3 deletions

View File

@ -14,8 +14,8 @@ import (
"github.com/google/uuid"
logging "github.com/ipfs/go-log/v2"
"github.com/jackc/pgx/v5"
manet "github.com/multiformats/go-multiaddr/net"
"github.com/yugabyte/pgx/v5"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"

View File

@ -4,7 +4,7 @@ import (
"errors"
"time"
"github.com/jackc/pgx/v5"
"github.com/yugabyte/pgx/v5"
"github.com/filecoin-project/lotus/lib/harmony/harmonydb"
"github.com/filecoin-project/lotus/lib/passcall"

View File

@ -723,7 +723,7 @@ func (dbi *DBIndex) StorageBestAlloc(ctx context.Context, allocate storiface.Sec
FROM storage_path
WHERE available >= $1
and NOW()-($2 * INTERVAL '1 second') < last_heartbeat
and heartbeat_err = ''
and heartbeat_err IS NULL
and (($3 and can_seal = TRUE) or ($4 and can_store = TRUE))
order by (available::numeric * weight) desc`,
spaceReq,