[MDEV-20458] missing row in mysql.transaction_registry when error occurred during transaction Created: 2019-08-30 Updated: 2023-10-06 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Versioned Tables |
| Affects Version/s: | 10.4.7 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Matt | Assignee: | Aleksey Midenkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | trx-versioning | ||
| Issue Links: |
|
||||||||
| Description |
|
Example code below demonstrates the issue. It seems that the transaction_id for transaction 1 is not stored in the transaction_registry, even though the results of the transaction are committed to the DB. drop table if exists productFK1; create table products1 ( create table productFK1 ( – Transaction 1 – Transaction 2 – Notice both t1 and t2 are present in the table: – But where did the t1 trxid go?: |
| Comments |
| Comment by Matt [ 2019-12-02 ] |
|
Any news on this one? Can you reproduce on your side? thanks |
| Comment by Matt [ 2019-12-03 ] |
|
I should mention that this causes a larger issue with transaction-precise SVT: In the above case, selecting from the table AS OF historical time will cause an error like this: { Error: (conn=299246, no: 4129, SQLState: HY000) TRX_ID 25889 not found in `mysql.transaction_registry` Because transaction id 25889 was recorded as start_trxid in the user table, but no corresponding entry for 25889 was created in the transaction_registry. |
| Comment by Aleksey Midenkov [ 2019-12-04 ] |
|
mkg Yes, that certainly reproduces. Transactional versioning needs more polishing (MDEV-16226) but unless we know good use for it these tasks are of minor priority. May I ask why did you decide to try it? Do you know any real production requirements where transactional versioning is preferred in favor of timestamp-based? |
| Comment by Matt [ 2019-12-04 ] |
|
Hi Aleksey, I, perhaps mistakenly, decided to use transaction versioning in a production application I have developed. The application needs to show the user the history of changes they have made to the data. We chose to use transaction-precise versioning instead of timestamp versioning for the obvious reason that we wanted a strong guarantee that it provides. We did not want the risk that our application would say a change was made at time=T, when actually that change wasn't visible until time>T. If this feature is not ready for prime-time, then perhaps you should note that here so that others do not make the same mistake I made: https://mariadb.com/kb/en/library/temporal-data-tables/ Matt |
| Comment by Aleksey Midenkov [ 2019-12-05 ] |
|
I see. The original design pursued more general goal of going beyond timer resolution. `transaction_registry` has many drawbacks though: it is slow, it is hard to backup/restore, it is not portable between nodes. So your message led me to think again of a design without `transaction_registry`. Thanks and sorry for the trouble! |