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.

No more than 30,000 operation can't be performed in one transaction

See original GitHub issue

Thre is a problem in Protocol class. When a transaction is executed (in Protoco.send) locks on concurrentOpt are aquired. The issue is when the number of operations in transaction + 1 is greater than the MaxConcurrentRequestsOpt that is defaulted to 30,000 the operation hangs forever, since that’s the way the semaphore.acquire(count) works. Of course the limit might be adjusted, but when the limit is reached, Protocol will freeze the whole execution.

Solution would be to perform check if the number of requested concurrent operations reached the limit value.

Besides that I wonder why every single operation in transaction is treated as concurrent operation? The transaction is executed in a single thread.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

1reaction
kpbochenekcommented, Sep 30, 2018

@Zuchos There are 2 issues raised here. I will refer to the first one and try investigate more a second one.

PR #48 should fix mentioned issue. In detail for:

  • inTransaction -> returned future will be failed with RedisTansactionBuilderException[IllegalArgumentException]
  • withTransaction -> exception will be thrown RedisTansactionBuilderException[IllegalArgumentException]

I will let this PR be open till tomorrow and if you have any concerns about it please comment there, if not I will merge it and release next version.

0reactions
Zuchoscommented, Feb 27, 2020

Sorry for not responding so long. Yeah, you are right, it will not block infinitely, but one transaction will block execution of another for a while and there is no control of how long this call will be blocked. Using tryAcquire with timeout would give control over it.

My point was that the name of variable max-concurrent-requests and its purpose are different. AFAIU all commands in transaction are executed in one Future so there is no concurrency between them. Transaction will take longer than single request and take more memory to store the list of commands and their responses, but it has nothing to do with concurrency access to the resource (redis). So here single concurrent command is treated the same way as a command in the batch the transaction.

Maybe it’s all cause by the ambiguity of the naming convention (transaction, has number of requests, which are not real requests, rather commands in one batch request).

Read more comments on GitHub >

github_iconTop Results From Across the Web

8.6 Flashcards | Chegg.com
Depreciation is not cash, so it is excluded. $50,000 income minus $20,000 debt service expense and $30,000 operating expenses = $0 cash flow....
Read more >
java.sql.SQLException: Timeout of 30000ms encountered ...
I am testing a little udp server I created. In my test environment, I have a udp client that runs every 30 seconds...
Read more >
PENAL CODE CHAPTER 31. THEFT - Texas Statutes
(A) the value of the property stolen is $2,500 or more but less than $30,000, or the property is less than 10 head...
Read more >
Capacity limits for dedicated SQL pool - Azure - Microsoft Learn
Polybase Loads, Total number of files, 1,000,000. Polybase loads can not exceed more than 1M files. You may experience the following error: ...
Read more >
Quotas and limits | BigQuery - Google Cloud
Limits cannot be changed unless otherwise stated. By default, BigQuery quotas and ... To run more than 100,000 exports per day, do one...
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