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
Incorrect limbo transaction numbers [JDBC266] #313
Comments
Commented by: Roman Rokytskyy (rrokytskyy) Which FB version do you use? The transaction number is decoded directly from the internal format stored in the database, so most likely the format was changed between the versions... |
Commented by: fabianobonin (fabianobonin) Using Firebird 2.5.1 here. I presume Jaybird retrives the transaction number decoding RDB$TRANSACTIONS.RDB$TRANSACTION_DESCRIPTION. |
Commented by: @mrotteveel Jaybird retrieves this from the servicemanager, it does not query the RDB$TRANSACTIONS table. I looked at the code and I do think the way it is decoding looks a bit weird: It also looks like it is only capable of reading single transactions, not multi database transactions. |
Modified by: @mrotteveelVersion: Jaybird 2.2 [ 10053 ] Version: Jaybird 2.1.6 [ 10285 ] Fix Version: Jaybird 2.3 [ 10440 ] |
Modified by: @mrotteveelFix Version: Jaybird 2.2.1 [ 10474 ] |
Commented by: @mrotteveel Removed Jaybird 2.2.1 from fix versions, essentially this has always been broken. |
Modified by: @mrotteveelFix Version: Jaybird 2.2.1 [ 10474 ] => |
Modified by: @mrotteveelassignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ] |
Commented by: @mrotteveel Committed fix to trunk, I would like to add a test that covers multi-site transactions, but I haven't found a way (yet) to create those using Jaybird. For now all existing tests pass. |
Commented by: @mrotteveel To do: backport fix to Jaybird 2.2.2 |
Modified by: @mrotteveelFix Version: Jaybird 2.2.2 [ 10480 ] |
Commented by: @mrotteveel Committed backport to 2.2 branch. |
Commented by: @mrotteveel Resolved, created subtask to add multi-site transactions to tests |
Modified by: @mrotteveelstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: fabianobonin (fabianobonin)
The code below:
FBMaintenanceManager mm = new FBMaintenanceManager("PURE_JAVA");
mm.setHost("xxxx");
mm.setPort(3050);
mm.setDatabase("xxxx");
mm.setUser("sysdba");
mm.setPassword("xxxx");
mm.setLogger(System.out);
mm.listLimboTransactions();
produces this output:
1089469460
While the command below, executed in the same database:
gfix -list xxxx:xxxx -user sysdba -pass xxxx
produces this output:
Transaction 4255740 is in limbo.
Multidatabase transaction:
Host Site: REPLIC-ES
Transaction 4255740
has been prepared.
Remote Site: <removed>
Database Path: <removed>
Host Site: REPLIC-ES
Transaction 4966552
has been rolled back.
Remote Site: <removed>
Database Path: <removed>
Automated recovery would rollback this transaction.
Note that transaction numbers are different...
This is probably an hex conversion problem.
The number returned by jaybird (1089469460) in hex is 40EFFC14.
The number returned by gfix (4255740) in hex is 40EFFC.
So i presume jaybird is taking an extra byte from somewhere.
Fabiano
Commits: f8ddbde e0b2203 cf2d897 75862c0
The text was updated successfully, but these errors were encountered: