3212 Andrei Elkin 2010-11-18
wl#5569 wl#5599
Recovery related. Prototyping the worker RLI instantiation, to be elaborated on.
modified:
sql/rpl_slave.cc
3211 Andrei Elkin 2010-11-18
wl#5569 MTS
Extending the wl#5563 prototype gradually.
This commit addresses:
1. recovery interface (a new Worker rli plus rli->gaq and pseudo-code for checkpoint
to update GAQ and the central RLI recovery table.
Wrt rli, C and W execute do_apply_event(c_rli) where c_rli is the central
instance. C executes update_pos(c_rli), but W update_pos(w_rli).
others:
- decreased processing time for rpl_parallel, serial.
@ sql/log_event.cc
Enhance Log_event::get_slave_worker_id() to classify events by set of parallelization properties;
Presence of a property in an event forces some actions both on C and W side.
en_queue etc are prepared to turn into circular_buffer_queue methods.
Pseudo-coded numerious todo:s wrt to low-level-design implementation.
Deployed changes due to Worker private rli.
Annotated on Deferred Array for B,p,r property events.
delete ev is moved from C to W which is fault-prone but it could not be kept
any longer as a part of de_queue() that transits into cir_buf_queue class.
@ sql/log_event.h
removed `soiled' that was used to make delete ev run safely.
Added Log_event methods identifying the parallelization properties, incl
- contains_partition_info() to identify events containing
info to be processed by the partition hash func
- starts,ends_group()
- also updated the list of only_serial().
@ sql/rpl_rli.cc
Only Coordinator can destroy Workers dynarray;
Relay_log_info::get_current_worker() turned out to become more complicated, see comments;
Reminder to migrate rli->future... into ev-> future_event_relay_log_pos
which would make Worker to find the value out the event's context;
Prototyped // w->flush_info() in stmt_done;
@ sql/rpl_rli.h
The worker RLI has `this_worker' pointing to the actual worker instance.
@ sql/rpl_rli_pdb.cc
Annotated with fine details APH etc implementation.
@ sql/rpl_rli_pdb.h
Trasformed earlier queue struct into a family of classes.
Recovery interface: last_group_done_index of Slave_worker to be filled in with an index
of GAQ queue by W. To poll the value by C at checkpoint.
Added CGEP to W context (sim to CGAP of C).
@ sql/rpl_slave.cc
Simplified the Worker poll.
Deployed worker rli initialization.
Recovery: rli->gaq is instantiated by C at worker poll activization.
Recovery: pseudo-code for checkpoint in next_event().
@ sql/sys_vars.cc
editted help lines for slave_max_pending_jobs.
modified:
mysql-test/extra/rpl_tests/rpl_parallel_load.test
sql/log_event.cc
sql/log_event.h
sql/rpl_rli.cc
sql/rpl_rli.h
sql/rpl_rli_pdb.cc
sql/rpl_rli_pdb.h
sql/rpl_slave.cc
sql/sys_vars.cc
=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc 2010-11-18 14:00:52 +0000
+++ b/sql/rpl_slave.cc 2010-11-18 14:50:54 +0000
@@ -3524,7 +3524,13 @@ pthread_handler_t handle_slave_worker(vo
w->tables_to_lock_count= 0;
// fixme: experimenting to make Workers to run ev->update_pos(w->w_rli)
- w->w_rli= Rpl_info_factory::create_rli(RLI_REPOSITORY_FILE, FALSE);
+ // fixme: a real hack! part of Rpl_info_factory::create_rli(RLI_REPOSITORY_FILE, FALSE);
+ w->w_rli= new Relay_log_info(FALSE,
+ &key_relay_log_info_run_lock,
+ &key_relay_log_info_data_lock,
+ &key_relay_log_info_data_cond,
+ &key_relay_log_info_start_cond,
+ &key_relay_log_info_stop_cond);
w->w_rli->info_thd= thd;
w->w_rli->workers= rli->workers; // shallow copying is sufficient
w->w_rli->this_worker= w;
Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20101118145054-hebusjgdcpo18bs9.bundle
| Thread |
|---|
| • bzr push into mysql-next-mr.crash-safe branch (andrei.elkin:3211 to 3212)WL#5569 WL#5599 | Andrei Elkin | 19 Nov |