Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tla-plus: to_check doesn't decrease during StageWritesAndRecordLoop #54130

Closed
y-taka-23 opened this issue Sep 9, 2020 · 3 comments · Fixed by #54306
Closed

tla-plus: to_check doesn't decrease during StageWritesAndRecordLoop #54130

y-taka-23 opened this issue Sep 9, 2020 · 3 comments · Fixed by #54306
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community

Comments

@y-taka-23
Copy link
Contributor

Describe the problem

In StageWritesAndRecordLoop, the committer process picks a key from pipelined to_check set one-by-one, then queries the state of the corresponding intent. Thus, the line:

to_check := to_check \union {key}

should be:

to_check := to_check \ {key}
@blathers-crl
Copy link

blathers-crl bot commented Sep 9, 2020

Hello, I am Blathers. I am here to help you get the issue triaged.

Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.

I have CC'd a few people who may be able to assist you:

  • @ricardocrdb (member of the technical support engineering team)

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community X-blathers-oncall labels Sep 9, 2020
@nvanbenschoten
Copy link
Member

Hi @y-taka-23, thanks for the report and good spot! That line does look incorrect. Would you like to submit a PR to fix it?

Also, I'd love to hear about how you found this? I stumbled upon https://speakerdeck.com/ytaka23/cloudnative-days-tokyo-2020 on Twitter earlier today and was very impressed.

@y-taka-23
Copy link
Contributor Author

y-taka-23 commented Sep 10, 2020

Would you like to submit a PR to fix it?

Of course yes! I'm going to do within this week.

I'd love to hear about how you found this?

Actually just by chance. For demonstrating TLA+'s semantics, I tried to show "If the committer couldn't fail, ImplicitCommitLeadsToExplicitCommit holds without the recovery procedure". Concretely speaking:

  • Make the committer process fair
  • Delete the skip clause of "unsuccessful consensus" in PipelineWrites
  • Delete the preventers

Against my expectation, TLC reported a violation with QueryPipelinedWrite-StageWritesAndRecordLoop infinite loop.

craig bot pushed a commit that referenced this issue Sep 15, 2020
54306: tla-plus: fix the loop for checking pipelined keys r=nvanbenschoten a=y-taka-23

This commit fixes the procedure of checking pipelined keys
in the StageWritesAndRecordLoop to resolve #54130

Release note: None

Co-authored-by: TAKAHASHI Yuto <[email protected]>
@craig craig bot closed this as completed in abc7f04 Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants