Skip to content

[5pt] Provide state diagram for a task #123

Closed

Description

@Totktonada

Aside of states and task actions we can show how timeout events (ttl, ttr) change a state. Also we can place internal actions that is performed by a queue to keep its guarantees (say, order of tasks): I mean, when exactly queue wake up blocked :take().

I guess this way it will be easier to understand what guarantees we provide and how it is achieved. It should make life easier for users as well as for developers.

https://github.com/tarantool/queue#fields-of-the-space-associated-with-each-queue

Activity

  1. changed the title [-]Provide state diagram for a task[/-] [+][32pt] Provide state diagram for a task[/+] on Nov 19, 2020
  2. added 3 commits that reference this issue on Dec 30, 2020
  3. veod32 commented on Dec 30, 2020

    @veod32
    Contributor

    For reference or further updates: below is the plantuml code used for drawing the diagram.

    @startuml
    hide empty description
    [*] --> READY : put()
    [*] --> DELAYED : put('my_task_data', { delay = delay })
    READY --> TAKEN : take()
    READY --> DONE : delete()
    READY --> BURIED : bury()
    READY --> DONE : ttl timeout
    TAKEN -up-> READY : release()
    TAKEN -up-> READY : ttr timeout
    TAKEN --> DELAYED : release(id, { delay = delay })
    TAKEN --> DONE : ack()
    TAKEN --> BURIED : bury()
    TAKEN --> DONE : delete()
    BURIED --> DONE : delete()
    BURIED --> READY : kick()
    BURIED --> DONE: ttl timeout
    DELAYED --> READY : timeout
    DELAYED --> DONE : delete()
    DONE --> [*] : remove executed task
    @enduml
    
  4. added a commit that references this issue on Dec 30, 2020
  5. linked a pull request that will close this issuegh-123 Add task state diagram #145on Dec 30, 2020
  6. changed the title [-][32pt] Provide state diagram for a task[/-] [+][5pt] Provide state diagram for a task[/+] on Feb 26, 2021
  7. added a commit that references this issue on Mar 11, 2021
    cdd2d71
  8. added a commit that references this issue on Mar 11, 2021
    286ab7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationgood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions