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.

Waiting on committed transaction hangs forever on error

See original GitHub issue

I use this on the result of signAndPost. It errors when the call errors, and resolved when the delivertx works, but when the delivertx errors, it never ends… no error is thrown.

Not sure if this an issue in ValueForUpdate.waitFor or that the updates on PostTx don’t contain errors.

// this waits for one commit to be writen, then returns the response
export async function waitForCommit(req: Promise<PostTxResponse>): Promise<PostTxResponse> {
  const res = await req;
  await res.blockInfo.waitFor(info => info.state === BcpTransactionState.InBlock);
  return res;
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
webmaster128commented, Jan 22, 2019

For the exact transaction search, we only need a single search-or-wait function, right? At least this is what postTx needs. Thus I propose

/**
 * Looks up transaction in history and if now found, waits until it is available.
 * 
 * As a consequence, this never resolves for non-existing transaction IDs.
 */
public async waitForTransaction(id: TransactionId): Promise<ConfirmedTransaction | FailedTransaction> {
0reactions
webmaster128commented, Jan 23, 2019

Sounds good?

Sounds like too many options for no clear reason/requirements. I’ll keep it simple and without timeout for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

postgresql hang forever on serializable transaction
All following transactions trying to insert the same key wait for the first. Again, this is valid for READ COMMITTED and SERIALIZABLE alike....
Read more >
SQL UPDATE hangs, or undetected deadlock — oracle-tech
Hi, I have a SQL UPDATE statement that will sometimes hang without ever timing out nor throwing any deadlock error.
Read more >
Reindexing index in empty DB sometimes is too slow
Every time I create indexes the first index to be reindexed is stuck for 3 minutes with logger errors (which are seen above)....
Read more >
How to Unstick Stuck Transactions in MetaMask - Medium
Now you don't have to worry anymore when your transactions are stuck, there are several ways to fix this inconvenience as we saw...
Read more >
MySQL Bugs: #99440: Threads of MTS Slave randomly stuck
On the slave we saw a lock wait timeout, but eventually 2 threads ... NULL | Connect | 1093 | Waiting for preceding...
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