wsrep_provider_options can't be set in runtime if no provider is loaded

Bug #1260290 reported by Alex Yurchenko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Committed
High
Yan Zhang
5.6
Fix Released
High
Yan Zhang
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Medium
Unassigned
5.6
Fix Released
Medium
Unassigned

Bug Description

This prevents full provider configuration before loading, the way it is done on startup, and as a result - proper provider reloading in runtime.

description: updated
Revision history for this message
Yan Zhang (yan.zhang) wrote :
Revision history for this message
Yan Zhang (yan.zhang) wrote :

the process of updating a provider should be
1. reload provider
2. set options
3. set address (connect action happens at this point)

for dummy provider, it should not accept any parameters in runtime. hence it's not a bug.

Revision history for this message
Yan Zhang (yan.zhang) wrote :
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

@Yan,

This issue was reported from https://bugs.launchpad.net/codership-mysql/+bug/1260283 where it was not possible to set the wsrep_provider_options. Can you check the steps in that issue as well

Revision history for this message
Yan Zhang (yan.zhang) wrote :
Revision history for this message
Yan Zhang (yan.zhang) wrote :

@Raghu

After second thought, I think it's better to stick to following process.
1. set provider options (when none provider is loaded)
2. reload provider (because some options can be set after provider initialization)
3. set address (connect action happens at this point)
4. after connecting to cluster, set some other dynamic options.

point 1,2 are mysql related part, and provider independent. And this issue is fixed in
http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3986

Revision history for this message
Yan Zhang (yan.zhang) wrote :

And if you want to set wsrep_provider_option in none_provider, you have to give all parameters.

The reason why I don't choose concatenation of parameters, although it's convenient for user to set, is because it would not allow you to clear wsrep_provider_option. And I think it's acceptable for user to give all parameters in none provider, because after all changing provider in runtime is rare case.

Revision history for this message
Yan Zhang (yan.zhang) wrote :
Revision history for this message
Nirbhay Choubey (nirbhay) wrote :

Freeing w->ctx before options can lead to segfault.

nirbhay@nirbhay-VirtualBox:~/project/repo/codership/5.5$ bzr diff
=== modified file 'wsrep/wsrep_dummy.c'
--- wsrep/wsrep_dummy.c 2014-05-04 07:12:59 +0000
+++ wsrep/wsrep_dummy.c 2014-06-11 20:44:29 +0000
@@ -44,11 +44,11 @@
 static void dummy_free(wsrep_t *w)
 {
     WSREP_DBUG_ENTER(w);
+ if (WSREP_DUMMY(w)->options) {
+ free(WSREP_DUMMY(w)->options);
+ WSREP_DUMMY(w)->options = NULL;
+ }
     free(w->ctx);
- if (WSREP_DUMMY(w)->options) {
- free(WSREP_DUMMY(w)->options);
- WSREP_DUMMY(w)->options = NULL;
- }
     w->ctx = NULL;
 }

Revision history for this message
Yan Zhang (yan.zhang) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1092

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.