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
Provide ability for engine to forcely make rollback for each TX that stays uncommitted more than some limit of time [CORE4238] #4562
Comments
Modified by: @pavel-zotovpriority: Major [ 3 ] => Minor [ 4 ] |
Modified by: @pavel-zotovsummary: Provide ability for engine to forcely make DISCONNECT for each client that starts TX and keep it uncommitted more than some limit of time => Provide ability for engine to forcely make rollback for each TX that stays uncommitted more than some limit of time |
Commented by: Sean Leyne (seanleyne) That would have a potential impact on gbak (or any equivalent process that a developer might need to create). It opens standard DB connection/transactions to then extract the data from the database. This suggestion would have the effect of killing such a process. It seems that this issue is trying to solve application issues at the database level, that is not correct. Further, if this were an issue for a developer, then they are free to build an application/utility which uses the MON$ tables to perform the same operation. |
Commented by: @pavel-zotov I think that the engine can detect such 'system' connects like from gbak or nbackup (being called directly or via fbsvcmgr). Of course such transactions have to be preserved from being forcely commit / rollback. > It seems that this issue is trying to solve application issues at the database level, that is not correct. Why it is not correct ? > if this were an issue for a developer, then they are free to build an application/utility which uses the MON$ tables Yes, we made such 'utility' (cron + bash script), exactly in THIS manner few years ago. |
Commented by: Sean Leyne (seanleyne) First, while I agree that the problem of long running TX can cause *possible* performance issues. The proposed solution, however, would use a very heavy "hammer" to solve a problem which would need much finer control. WRT the existing settings/options, I disagree that these are in place to solve application issues -- they are about supporting the database engine. |
Commented by: @pavel-zotov DBA and application developers often do their job separately (both in space and time). I suggest simple solution that can facilitate dayly usage of heavy-loaded database - even without need to know something about MON$-tables, cron (`at` on Windows) or bash / cmd script languages :-) |
Commented by: Sean Leyne (seanleyne) But your 'simple' solution will only have narrow use and not solve the real breath of issue -- it assumes that the unique variations of connection/transaction purposes can be discovered from knowledge which is available to the engine. Further, I don't see how that will be possible without: |
Commented by: @pavel-zotov > it assumes that the unique variations of connection/transaction purposes can be discovered from knowledge I think that only few tools from Firebird package should never be interrupted in such 'automated' mode: {gbak, nbackup, gfix, gstat}. These names even can be hardcoded inside some 'checking' function. If current user = SYSDBA and process_name belongs to this list - do NOT interrupt it. Otherwise - check for timeout expired. >Further, I don't see how that will be possible without: I think there is no any need neither adding properties to connections/transactions nor any complex regexp. PS. Eventually, this feature in should be DISABLED by default. It's up to DBA to use it. If there are some another (3rd party) programs that should not be interrupt - welcome to manually solution via cron + MON$-tables + bash / cmd script. |
Commented by: Sean Leyne (seanleyne) I don't see it as a duplicate, certainly related though, because this case describes more 'inteligence' then that case describes. |
Modified by: @dyemanovFix Version: 4.0 Alpha 1 [ 10731 ] => |
Commented by: PizzaProgram Ltd. (szakilaci) I agree on this is just a small part of CORE985 (Transaction Timeout part). |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Duplicate [ 3 ] Fix Version: 4.0 Alpha 1 [ 10731 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
Is related to CORE985
Is replaced by CORE5488
Votes: 1
If TX has been opened in any mode tha is NOT { read_committed | read_only } then its very easy to force database to accumulate in it huge amount of versions of updated / deleted records: it's sufficient just avoid commit/rollback such TX. This leads to "heavy work" for GC and almost always decrease application performance (all DML except insertions).
It will be useful if DBA could assign (in database.conf or firebird.conf) maximum allowed timeout for ANY transactions that have been started in NOT ( read_committed | read_only ) mode - even if they started by SYSDBA or db owner. Such TXs should be forcelly committed (if no changes occured) or rollbacked.
The text was updated successfully, but these errors were encountered: