Transaction message segmenting does not work in all cases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
David Shrewsbury | ||
7.0 |
Fix Released
|
Medium
|
David Shrewsbury |
Bug Description
Once a GPB Transaction messages reaches a certain size in bytes, we are supposed to use a new Transaction message with the same transaction ID for the continuing transaction changes. We handle this properly when we have a single statement affecting many rows, for example:
UPDATE x SET y = 10 WHERE z > 0;
This update could potentially cause many record changes which would cause the Transaction message to reach its limit. It is handled correctly.
However, the protobuf definitions don't seem to have the flexibility to be able to handle the case of many single-
BEGIN;
INSERT row #1;
UPDATE row #2
...
UPDATE row #N-1
INSERT row #N;
COMMIT;
Workaround is to keep transaction sizes below the value used for --transaction-
Related branches
- Drizzle Developers: Pending requested
-
Diff: 3253 lines (+1180/-248)25 files modifieddrizzled/message/transaction.proto (+27/-1)
drizzled/transaction_services.cc (+158/-236)
drizzled/transaction_services.h (+12/-11)
plugin/transaction_log/tests/r/bug660779.result (+6/-0)
plugin/transaction_log/tests/r/bug686781.result (+507/-0)
plugin/transaction_log/tests/r/bulk_commit.result (+6/-0)
plugin/transaction_log/tests/r/bulk_rollback.result (+6/-0)
plugin/transaction_log/tests/r/ddl_transaction_id.result (+12/-0)
plugin/transaction_log/tests/r/information_schema.result (+10/-0)
plugin/transaction_log/tests/r/rollback_statement.result (+6/-0)
plugin/transaction_log/tests/r/savepoint.result (+4/-0)
plugin/transaction_log/tests/r/transaction_log_alter.result (+58/-0)
plugin/transaction_log/tests/r/transaction_log_create.result (+36/-0)
plugin/transaction_log/tests/r/transaction_log_data_type.result (+172/-0)
plugin/transaction_log/tests/r/transaction_log_delete.result (+22/-0)
plugin/transaction_log/tests/r/transaction_log_drop.result (+10/-0)
plugin/transaction_log/tests/r/transaction_log_large_blob.result (+2/-0)
plugin/transaction_log/tests/r/transaction_log_loaddata.result (+2/-0)
plugin/transaction_log/tests/r/transaction_log_replace.result (+8/-0)
plugin/transaction_log/tests/r/transaction_log_rollback.result (+2/-0)
plugin/transaction_log/tests/r/transaction_log_schema.result (+12/-0)
plugin/transaction_log/tests/r/transaction_log_transaction.result (+28/-0)
plugin/transaction_log/tests/r/transaction_log_update.result (+38/-0)
plugin/transaction_log/tests/t/bug686781-master.opt (+1/-0)
plugin/transaction_log/tests/t/bug686781.test (+35/-0)
Changed in drizzle: | |
importance: | Undecided → Medium |
Changed in drizzle: | |
status: | Confirmed → In Progress |
milestone: | future → 2011-01-17 |
Changed in drizzle: | |
status: | In Progress → Fix Committed |
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
Current plan is to add a 'segment_id' and 'end_segment' values to the Transaction GPB message format (similar to the values used in the Statement GPB message). These can be used in conjunction with the values in the Statement message.
So when a Statement needs to be segmented (which we currently support), we will set the segment information in the Statement AND Transaction messages.
When a Transaction needs to be segmented due to the situation described in the bug report (many statements, none of which are segmented themselves), then the Transaction message segment information will be used.