question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mysql unack cause sub_workflow executed twice

See original GitHub issue

processAllUnacks schedule thread set popped=false before this message was acked by SystemTaskExecutor. below are timeline:

  1. 2020-09-07 17:41:07.025 insert new sub_workflow task
  2. 2020-09-07 17:41:07.095 thread A poll task and got one
  3. 2020-09-07 17:41:07.148 thread B pool task and got the same one
  4. 2020-09-07 17:41:08.113 thread A set popped = true
  5. 2020-09-07 17:41:08.142 QueueDao Scheduler set popped = false
  6. 2020-09-07 17:41:08.168 thread B set popped =true
  7. 2020-09-07 17:41:08.249 thread A remove message

I don’t understand this sql : UPDATE queue_message SET popped = false WHERE popped = true AND TIMESTAMPADD(SECOND,60,CURRENT_TIMESTAMP) > deliver_on should it be TIMESTAMPADD(SECOND,-60,CURRENT_TIMESTAMP) > deliver_on? not add but minus?

@apanicker-nflx

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rickfishcommented, Sep 18, 2020

@HenryLauu @apanicker-nflx @deluxor I created PR #1875 to fix this. Unfortunately, it caused the MySQLQueueDAOTest.processUnacksTest to fail. I will have to look into it.

0reactions
HenryLauucommented, Sep 18, 2020

Hello @rickfish @apanicker-nflx this is obviously concurrent bug which need to be fixed. Please make a consideration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What can cause MySQL to accidentally execute the same ...
But what could the root cause be? Is there ever something in MySQL that causes a hiccup where an operation runs twice?
Read more >
MySQL function: in clause HAVING query runs twice
A problem occurs while I try to limit results to price BETWEEN 20 AND 40. If I do it in HAVING CLAUSE, this...
Read more >
MySQL Connection Handling and Scaling
In this post we describe MySQL connections, user threads, and scaling. We hope that an increased understanding of how MySQL works will help ......
Read more >
Stored procedure called once, but executed twice.
The store procedure is being called around 5 million times in a year and there are only 3 cases. This 3 cases are...
Read more >
How To Troubleshoot Issues in MySQL - DigitalOcean
Sometimes users run into problems once they begin issuing queries on their data. ... One way to find which query statement is the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found