Skip to content

gh-123 Add task state diagram - #145

Merged
LeonidVas merged 1 commit into
masterfrom
gh-123-task-state-diag
Mar 11, 2021
Merged

LeonidVas merged 1 commit into
masterfrom
gh-123-task-state-diag

Conversation

@veod32

@veod32 veod32 commented Dec 30, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@veod32 veod32 linked an issue Dec 30, 2020 that may be closed by this pull request

@LeonidVas LeonidVas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thank you for the patchset.
I experimented with the diagram and it looks like I was able to achieve a nicer picture.

@startuml
[*]     -down->  READY   : put()
[*]     -down->  DELAYED : put('my_task_data',\n{ delay = delay })
READY   -down->  TAKEN   : take()
READY   -down->  DONE    : delete() /\nttl timeout
READY   -down->  BURIED  : bury()
TAKEN   -up->    READY   : release() /\nttr timeout
TAKEN   -left->  DELAYED : release\n(id, { delay = delay })
TAKEN   -down->  DONE    : ack() / delete()
TAKEN   -right-> BURIED  : bury()
BURIED  -down->  DONE    : delete() /\nttl timeout
BURIED  -up->    READY   : kick()
DELAYED -up->    READY   : timeout
DELAYED -down->  DONE    : delete()
DONE    -down->  [*]     : remove executed task
@enduml

state_diagram
I suggest adding images to the doc/images with the plantUML source for future editing.

Comment thread README.md
The request "require 'queue'" causes automatic creation of
the `_queue` space, unless it already exists. The same request
also sets the necessary space triggers and other objects
associated with queues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you decide to remove the double space ("\n" in md) here and below?
These are unnecessary changes. If you want to update something that not related with patchset, create a separate PR.
I suggest you read https://github.com/tarantool/tarantool/wiki/Code-review-procedure#general-coding-points-to-check and https://github.com/tarantool/tarantool/wiki/Code-review-procedure#commit-message .

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got your point on including only relevant updates into PR.

If these double spaces serve some purpose and are not just typos, I will correct this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two whitespaces at the end of line issues a <br /> tag into HTML. Personally I consider this feature as broken in two ways: the syntax is weird, the feature is not needed (it always better to just split text with paragraphs or use three-backticks code blocks). So I prefer to don't use it. And GFM (GitHub's Markdown dialect) anyway preserves line breaks, so it is useless on GitHub.

Anyway, Leonid is right, it is not relevant to the problem that you are solving.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got your point on including only relevant updates into PR.

If these double spaces serve some purpose and are not just typos, I will correct this.

Yep. These are not typos.

Comment thread README.md Outdated
Comment thread README.md Outdated
@LeonidVas
LeonidVas self-requested a review March 5, 2021 11:28
@NickVolynkin
NickVolynkin force-pushed the gh-123-task-state-diag branch from d42f032 to fc97cc2 Compare March 5, 2021 13:00

@LeonidVas LeonidVas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
I'll comfortable with one of #145 (comment) , #145 (comment) .
Please correct the code according to the comments, squash the commits, self-review the code and update the PR.

Comment thread README.md
The request "require 'queue'" causes automatic creation of
the `_queue` space, unless it already exists. The same request
also sets the necessary space triggers and other objects
associated with queues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got your point on including only relevant updates into PR.

If these double spaces serve some purpose and are not just typos, I will correct this.

Yep. These are not typos.

@LeonidVas
LeonidVas self-requested a review March 10, 2021 12:12

@LeonidVas LeonidVas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistakenly chose "Approve" instead of "Request changes" in #145 (review)

@veod32
veod32 force-pushed the gh-123-task-state-diag branch 2 times, most recently from 002727d to 6c48d16 Compare March 11, 2021 15:46
@veod32

veod32 commented Mar 11, 2021

Copy link
Copy Markdown
Contributor Author

I'll comfortable with one of #145 (comment) , #145 (comment) .
Please correct the code according to the comments, squash the commits, self-review the code and update the PR.

Done

The diagram gives a concise and holistic view of all the task states
and what method triggers each transition between the states.

Closes #123
@LeonidVas
LeonidVas force-pushed the gh-123-task-state-diag branch from 6c48d16 to cdd2d71 Compare March 11, 2021 16:11
@LeonidVas
LeonidVas self-requested a review March 11, 2021 16:13
@Totktonada

Copy link
Copy Markdown
Contributor

Does not look well in the dark mode.

image

@LeonidVas

LeonidVas commented Mar 11, 2021 •

Copy link
Copy Markdown
Contributor

Does not look well in the dark mode.

image

Let's do it beautifully in the future #148

@LeonidVas
LeonidVas merged commit 286ab7d into master Mar 11, 2021
@LeonidVas
LeonidVas deleted the gh-123-task-state-diag branch March 11, 2021 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[5pt] Provide state diagram for a task

4 participants