Skip to content

Commit

Permalink
fix: curio: fix incorrect null check for varchar column (#11881)
Browse files Browse the repository at this point in the history
* err check empty string

* log skipped tasks
  • Loading branch information
LexLuthr committed Apr 16, 2024
1 parent bc43bd6 commit 3ebb92a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/harmony/harmonytask/harmonytask.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ func (e *TaskEngine) pollerTryAllWork() bool {
resources.CleanupMachines(e.ctx, e.db)
}
for _, v := range e.handlers {
if v.AssertMachineHasCapacity() != nil {
if err := v.AssertMachineHasCapacity(); err != nil {
log.Debugf("skipped scheduling %s type tasks on due to %s", v.Name, err.Error())
continue
}
var unownedTasks []TaskID
Expand Down
2 changes: 1 addition & 1 deletion storage/paths/db_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 is null
and heartbeat_err = ''
and (($3 and can_seal = TRUE) or ($4 and can_store = TRUE))
order by (available::numeric * weight) desc`,
spaceReq,
Expand Down

0 comments on commit 3ebb92a

Please sign in to comment.