utubettl: possible bug with on_task_change?

Aperta
#100 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
lua
Ambito
backend

Direzione di ricerca

Inizia con process_neighbour in utubettl e traccia la ricerca nell’indice utube e le chiamate a on_task_change. Esamina come il framework utilizza il task notificato e come viene rappresentata la priorità; il lavoro è completato quando si è determinato se il neighbour selezionato deve essere il task READY con la priorità più bassa e si è registrato il comportamento o la modifica richiesti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When releasing/deleting a task in utubettl, the code finds a "neighbour" task - a task with the same utube field that is in READY state. It then notifies the framework that this neighbour task is now available for taking, by calling on_task_change.

local function process_neighbour(self, task, operation)
    self:on_task_change(task, operation)
    if task ~= nil then
        local neighbour = self.space.index.utube:min{state.READY, task[i_utube]}
        if neighbour ~= nil and neighbour[i_status] == state.READY then
            self:on_task_change(neighbour)
        end
    end
    return task
end

A possible bug is that this neighbour task may not be the one with the lowest priority, because the priority field not in the "utube" index.
Currently, the framework wakes up a consumer fiber, but does not look at the particular task being passed to on_task_change, so it doesn't matter.

Is this a bug?

Lingua principale
Lua
Stelle
244
Fork
56
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tarantool/queue

Tutte le issue di tarantool/queue

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.