Transaction ID not unique

Bug #674588 reported by David Shrewsbury
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Critical
Joe Daly
7.0
Fix Released
Critical
Joe Daly

Bug Description

When running randgen to look for bug 673105, I saw several messages in the transaction log with the same transaction id number. They are not part of a multi-message Transaction (they are rather small). Used the following randgen command:

./gentest.pl --dsn=dbi:drizzle:host=localhost:port=9306:user=root:password="":database=test --gendata=conf/drizzle/translog_drizzle.zz --grammar=conf/drizzle/translog_concurrent3.yy --queries=50 --threads=10 --sqltrace --debug --Reporter=DrizzleConcurrentTransactionLog > /tmp/randgen.out

Tags: replication

Related branches

Changed in drizzle:
assignee: nobody → Joe Daly (skinny.moey)
importance: Undecided → Critical
Revision history for this message
Patrick Crews (patrick-crews) wrote : Re: [Bug 674588] [NEW] Transaction ID not unique

It should be noted that I haven't seen COUNT(transaction_id) > 2 when
checking the log, even with high query count and concurrency.

Please let me know if you would like a dumpfile, transaction log or whatever
to assist.

On Fri, Nov 12, 2010 at 11:38 AM, David Shrewsbury <
<email address hidden>> wrote:

> Public bug reported:
>
> When running randgen to look for bug 673105, I saw several messages in
> the transaction log with the same transaction id number. They are not
> part of a multi-message Transaction (they are rather small). Used the
> following randgen command:
>
> ./gentest.pl
>
> --dsn=dbi:drizzle:host=localhost:port=9306:user=root:password="":database=test
> --gendata=conf/drizzle/translog_drizzle.zz
> --grammar=conf/drizzle/translog_concurrent3.yy --queries=50 --threads=10
> --sqltrace --debug --Reporter=DrizzleConcurrentTransactionLog >
> /tmp/randgen.out
>
> ** Affects: drizzle
> Importance: Critical
> Assignee: Joe Daly (skinny.moey)
> Status: New
>
> ** Changed in: drizzle
> Assignee: (unassigned) => Joe Daly (skinny.moey)
>
> ** Changed in: drizzle
> Importance: Undecided => Critical
>
> --
> Transaction ID not unique
> https://bugs.launchpad.net/bugs/674588
> You received this bug notification because you are a member of Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud Infrastructure and Web
> Applications: New
>
> Bug description:
> When running randgen to look for bug 673105, I saw several messages in the
> transaction log with the same transaction id number. They are not part of a
> multi-message Transaction (they are rather small). Used the following
> randgen command:
>
> ./gentest.pl--dsn=dbi:drizzle:host=localhost:port=9306:user=root:password="":database=test
> --gendata=conf/drizzle/translog_drizzle.zz
> --grammar=conf/drizzle/translog_concurrent3.yy --queries=50 --threads=10
> --sqltrace --debug --Reporter=DrizzleConcurrentTransactionLog >
> /tmp/randgen.out
>
>
>

Revision history for this message
David Shrewsbury (dshrews) wrote :

I've seen instances of more than 2 per trx id.

On Fri, Nov 12, 2010 at 12:04 PM, Patrick Crews
<email address hidden>wrote:

> It should be noted that I haven't seen COUNT(transaction_id) > 2 when
> checking the log, even with high query count and concurrency.
>
> Please let me know if you would like a dumpfile, transaction log or
> whatever
> to assist.
>
> On Fri, Nov 12, 2010 at 11:38 AM, David Shrewsbury <
> <email address hidden>> wrote:
>
> > Public bug reported:
> >
> > When running randgen to look for bug 673105, I saw several messages in
> > the transaction log with the same transaction id number. They are not
> > part of a multi-message Transaction (they are rather small). Used the
> > following randgen command:
> >
> > ./gentest.pl
> >
> >
> --dsn=dbi:drizzle:host=localhost:port=9306:user=root:password="":database=test
> > --gendata=conf/drizzle/translog_drizzle.zz
> > --grammar=conf/drizzle/translog_concurrent3.yy --queries=50 --threads=10
> > --sqltrace --debug --Reporter=DrizzleConcurrentTransactionLog >
> > /tmp/randgen.out
> >
> > ** Affects: drizzle
> > Importance: Critical
> > Assignee: Joe Daly (skinny.moey)
> > Status: New
> >
> > ** Changed in: drizzle
> > Assignee: (unassigned) => Joe Daly (skinny.moey)
> >
> > ** Changed in: drizzle
> > Importance: Undecided => Critical
> >
> > --
> > Transaction ID not unique
> > https://bugs.launchpad.net/bugs/674588
> > You received this bug notification because you are a member of Drizzle-
> > developers, which is subscribed to Drizzle.
> >
> > Status in A Lightweight SQL Database for Cloud Infrastructure and Web
> > Applications: New
> >
> > Bug description:
> > When running randgen to look for bug 673105, I saw several messages in
> the
> > transaction log with the same transaction id number. They are not part of
> a
> > multi-message Transaction (they are rather small). Used the following
> > randgen command:
> >
> >
> ./gentest.pl--dsn=dbi:drizzle:host=localhost:port=9306:user=root:password="":database=test
> > --gendata=conf/drizzle/translog_drizzle.zz
> > --grammar=conf/drizzle/translog_concurrent3.yy --queries=50 --threads=10
> > --sqltrace --debug --Reporter=DrizzleConcurrentTransactionLog >
> > /tmp/randgen.out
> >
> >
> >
>
> --
> Transaction ID not unique
> https://bugs.launchpad.net/bugs/674588
> You received this bug notification because you are a member of Drizzle-
> developers, which is subscribed to Drizzle.
>

Revision history for this message
Patrick Crews (patrick-crews) wrote :

Attached in the tarball is the dumpfile of the master db post-test, the transaction log, and the randgen output (lists all queries executed + failure output).

This data is from a run that should be easy to troubleshoot:
select transaction_id, count(transaction_id) from transaction_log_transactions group by transaction_id having count(transaction_id) > 1;
+----------------+-----------------------+
| transaction_id | count(transaction_id) |
+----------------+-----------------------+
| 776 | 2 |
| 782 | 2 |
| 788 | 2 |
| 794 | 2 |
| 801 | 2 |
| 808 | 2 |
| 815 | 2 |
| 822 | 2 |
| 1427 | 2 |
| 1435 | 2 |
| 1443 | 2 |
| 1451 | 2 |
| 1460 | 2 |
| 1469 | 2 |
| 1478 | 2 |
| 1487 | 2 |
| 2053 | 17 |
| 2081 | 5 |
| 2097 | 4 |
| 2105 | 4 |
+----------------+-----------------------+
20 rows in set (0 sec)

tags: added: replication
Revision history for this message
Joe Daly (skinny.moey) wrote :

Is this something that should even be in the transaction log? Im leaning towards no, it currently shows up and seems to be causing some strangeness with transaction ids.

drizzle> ALTER TABLE `A` ENABLE KEYS;
Query OK, 0 rows affected, 1 warning (0.01 sec)

drizzle> show warnings;
+-------+------+-------------------------------------------------------+
| Level | Code | Message |
+-------+------+-------------------------------------------------------+
| Note | 1031 | Table storage engine for 'A' doesn't have this option |
+-------+------+-------------------------------------------------------+
1 row in set (0 sec)

drizzle>

Revision history for this message
Joe Daly (skinny.moey) wrote :

this is happening for any callers of drizzled::write_bin_log the transaction GPB message gets constructed before a transaction is actually started in inno. Not sure what a good solution is for this, while we could just add in TransactionServices::rawStatement() a call to start a transaction in inno this would allocate a id that can then be used that doesnt seem like the correct solution

Revision history for this message
Patrick Crews (patrick-crews) wrote : Re: [Bug 674588] Re: Transaction ID not unique

This is part of the randgen / gendata.
The program does ENABLE/DISABLE when it is loading a table.

I'm not certain if this should be logged given that it doesn't actually do
anything. I do think such changes that do have an effect *should* be logged
though.

On Sun, Nov 14, 2010 at 6:35 PM, Joe Daly <email address hidden> wrote:

> Is this something that should even be in the transaction log? Im leaning
> towards no, it currently shows up and seems to be causing some
> strangeness with transaction ids.
>
> drizzle> ALTER TABLE `A` ENABLE KEYS;
> Query OK, 0 rows affected, 1 warning (0.01 sec)
>
> drizzle> show warnings;
> +-------+------+-------------------------------------------------------+
> | Level | Code | Message |
> +-------+------+-------------------------------------------------------+
> | Note | 1031 | Table storage engine for 'A' doesn't have this option |
> +-------+------+-------------------------------------------------------+
> 1 row in set (0 sec)
>
> drizzle>
>
> --
> Transaction ID not unique
> https://bugs.launchpad.net/bugs/674588
> You received this bug notification because you are a member of Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud Infrastructure and Web
> Applications: New
>
> Bug description:
> When running randgen to look for bug 673105, I saw several messages in the
> transaction log with the same transaction id number. They are not part of a
> multi-message Transaction (they are rather small). Used the following
> randgen command:
>
> ./gentest.pl--dsn=dbi:drizzle:host=localhost:port=9306:user=root:password="":database=test
> --gendata=conf/drizzle/translog_drizzle.zz
> --grammar=conf/drizzle/translog_concurrent3.yy --queries=50 --threads=10
> --sqltrace --debug --Reporter=DrizzleConcurrentTransactionLog >
> /tmp/randgen.out
>
>
>

Revision history for this message
Joe Daly (skinny.moey) wrote :

Ive run this against lp:~dshrews/drizzle/bug673105 many times and have not been able to reproduce this.

Patrick do you mind running this a few times running the query "select transaction_id, count(transaction_id) from data_dictionary.transaction_log_transactions group by transaction_id having count(transaction_id) > 1;" after completion. Assuming you have the same success I think this can be closed.

Revision history for this message
Joe Daly (skinny.moey) wrote :

this was fixed in the fixes for https://bugs.launchpad.net/drizzle/+bug/673105

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.