Merge lp:~vkolesnikov/pbxt/pbxt-index-recovery-problem into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-index-recovery-problem
Merge into: lp:pbxt
Diff against target: None lines
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-index-recovery-problem
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+7245@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

merged with upstream

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2009-06-03 14:53:00 +0000
+++ ChangeLog 2009-06-09 15:06:41 +0000
@@ -3,6 +3,8 @@
33
4------- 1.0.08 RC - Not yet released4------- 1.0.08 RC - Not yet released
55
6RN244: Fixed a recovery problem: during the recovery of "record modified" action the table was updated before the old index entries were removed; then the xres_remove_index_entries was supplied the new record which lead to incorrect index update
7
6RN243: Fixed a bug that caused a recovery failure if partitioned pbxt tables where present. This happended because the recovery used a MySQL function to open tables and the PBXT handler was not yet registered8RN243: Fixed a bug that caused a recovery failure if partitioned pbxt tables where present. This happended because the recovery used a MySQL function to open tables and the PBXT handler was not yet registered
79
8RN242: Fixed a bug that caused a deadlock if pbxt initialization failed. This happened because pbxt ceanup was done from pbxt_init() with PLUGIN_lock being held by MySQL which lead to a deadlock in the freeer thread10RN242: Fixed a bug that caused a deadlock if pbxt initialization failed. This happened because pbxt ceanup was done from pbxt_init() with PLUGIN_lock being held by MySQL which lead to a deadlock in the freeer thread
911
=== modified file 'src/restart_xt.cc'
--- src/restart_xt.cc 2009-06-03 14:07:54 +0000
+++ src/restart_xt.cc 2009-06-09 15:06:41 +0000
@@ -638,6 +638,15 @@
638 case XT_LOG_ENT_INSERT_BG:638 case XT_LOG_ENT_INSERT_BG:
639 case XT_LOG_ENT_DELETE_BG:639 case XT_LOG_ENT_DELETE_BG:
640 rec_id = XT_GET_DISK_4(record->xu.xu_rec_id_4);640 rec_id = XT_GET_DISK_4(record->xu.xu_rec_id_4);
641
642 /* This should be done before we apply change to table, as otherwise we lose
643 * the key value that we need to remove from index
644 */
645 if (record->xl.xl_status_1 == XT_LOG_ENT_REC_MODIFIED) {
646 if ((rec_data = xres_load_record(self, ot, rec_id, NULL, 0, rec_buf, tab->tab_dic.dic_ind_cols_req)))
647 xres_remove_index_entries(ot, rec_id, rec_data);
648 }
649
641 len = (size_t) XT_GET_DISK_2(record->xu.xu_size_2);650 len = (size_t) XT_GET_DISK_2(record->xu.xu_size_2);
642 if (!XT_PWRITE_RR_FILE(ot->ot_rec_file, xt_rec_id_to_rec_offset(tab, rec_id), len, (xtWord1 *) &record->xu.xu_rec_type_1, &ot->ot_thread->st_statistics.st_rec, ot->ot_thread))651 if (!XT_PWRITE_RR_FILE(ot->ot_rec_file, xt_rec_id_to_rec_offset(tab, rec_id), len, (xtWord1 *) &record->xu.xu_rec_type_1, &ot->ot_thread->st_statistics.st_rec, ot->ot_thread))
643 xt_throw(self);652 xt_throw(self);
@@ -648,10 +657,6 @@
648 case XT_LOG_ENT_DELETE:657 case XT_LOG_ENT_DELETE:
649 case XT_LOG_ENT_DELETE_BG:658 case XT_LOG_ENT_DELETE_BG:
650 break;659 break;
651 case XT_LOG_ENT_REC_MODIFIED:
652 if ((rec_data = xres_load_record(self, ot, rec_id, NULL, 0, rec_buf, tab->tab_dic.dic_ind_cols_req)))
653 xres_remove_index_entries(ot, rec_id, rec_data);
654 /* No break required: */
655 default:660 default:
656 if ((rec_data = xres_load_record(self, ot, rec_id, &record->xu.xu_rec_type_1, len, rec_buf, tab->tab_dic.dic_ind_cols_req))) {661 if ((rec_data = xres_load_record(self, ot, rec_id, &record->xu.xu_rec_type_1, len, rec_buf, tab->tab_dic.dic_ind_cols_req))) {
657 row_id = XT_GET_DISK_4(record->xu.xu_row_id_4);662 row_id = XT_GET_DISK_4(record->xu.xu_row_id_4);
@@ -3197,13 +3202,13 @@
31973202
3198static void *xn_xres_run_recovery_thread(XTThreadPtr self)3203static void *xn_xres_run_recovery_thread(XTThreadPtr self)
3199{3204{
3200 THD *mysql_thread;3205 THD *mysql_thread;
32013206
3202 mysql_thread = (THD *)myxt_create_thread();3207 mysql_thread = (THD *)myxt_create_thread();
32033208
3204 while(!ha_resolve_by_legacy_type(mysql_thread, DB_TYPE_PBXT))3209 while(!ha_resolve_by_legacy_type(mysql_thread, DB_TYPE_PBXT))
3205 xt_sleep_milli_second(1);3210 xt_sleep_milli_second(1);
32063211
3207 xt_open_database(self, mysql_real_data_home, TRUE);3212 xt_open_database(self, mysql_real_data_home, TRUE);
3208 pbxt_database = self->st_database;3213 pbxt_database = self->st_database;
3209 xt_heap_reference(self, pbxt_database);3214 xt_heap_reference(self, pbxt_database);

Subscribers

People subscribed via source and target branches