Re: [Sqlrelay-discussion] r/w splitting configuration question
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2012-03-09 02:42:36
|
Hi Jan,
It looks like I introduced a bug in the last release. Here is a quick fix:
Edit src/util/sqlrconfigfile.cpp and look for the following code, near
line 558:
// Filter section, nested (runquery*)
case FILTER_TAG:
currentname="filter";
if (!charstring::compare(name,"runquery")) {
thistag=RUNQUERY_TAG;
} else {
ok=false;
}
break;
// Filter section, nested (runquery*)
case ROUTE_TAG:
currentname="route";
if (!charstring::compare(name,"runquery")) {
thistag=RUNQUERY_TAG;
} else {
ok=false;
}
break;
Change instances of "runquery" to "query" and RUNQUERY_TAG to QUERY_TAG,
as follows:
// Filter section, nested (query*)
case FILTER_TAG:
currentname="filter";
if (!charstring::compare(name,"query")) {
thistag=QUERY_TAG;
} else {
ok=false;
}
break;
// Filter section, nested (query*)
case ROUTE_TAG:
currentname="route";
if (!charstring::compare(name,"query")) {
thistag=QUERY_TAG;
} else {
ok=false;
}
break;
I guess I got a little too aggressive with search and replace. With
those modifications, it should work as expected.
Sorry for the confusion.
David Muse
dav...@fi...
On 03/08/2012 06:31 AM, jan...@id... wrote:
> ok sorry.
> If I omit the query statements (which is senseless) I am able to start the router instance.
>
> # sqlr-start -id test -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> Starting listener:
> sqlr-listener -id test -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
>
> Starting 1 connections to defaultid :
> sqlr-connection-router -id test -connectionid defaultid -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
>
> Starting scaler:
> sqlr-scaler -id test -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
>
> cache manager already running.
> [...]
>
> But how can I use the query patterns sucessfully ?
>
> kind regards,
>
> ---
>
> Jan
> ________________________________________
> Von: Zeller, Jan (ID)
> Gesendet: Donnerstag, 8. März 2012 12:14
> An: sql...@li...
> Betreff: r/w splitting configuration question
>
> dear sqlrelay list,
>
> i try to configure r/w splitting.
>
> i am able to start the following instances "master"& "slave" but not the router instance called "test".
>
> The error message is :
>
> unexpected tag<query> within<route>
> Couldn't parse config file /opt/sqlrelay-0.44/etc/sqlrelay.conf.
> Couldn't find id test.
>
>
> By the way what is the purpose of "sqlr-connection-router" ?
> Should "sqlr-connection-router" or "sqlr-start" be used to start the router instance ?
> Anyway it fails with both programs.
>
> The config file used is nearly the same as stated on http://sqlrelay.sourceforge.net/sqlrelay/router.html
>
>
> # sqlr-start -id master -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> [...]
> # sqlr-start -id slave -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> [...]
>
> # pgrep -lf sql
> 27998 sqlr-listener -id master -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> 28028 sqlr-connection-mysql -id master -connectionid db1 -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> 28060 sqlr-scaler -id master -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> 28067 sqlr-cachemanager
> 29266 sqlr-listener -id slave -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> 29271 sqlr-connection-mysql -id slave -connectionid db1 -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
> 29288 sqlr-scaler -id slave -config /opt/sqlrelay-0.44/etc/sqlrelay.conf
>
> What am I doing wrong ?
> Any hints ?
>
> kind regards,
>
> Jan
>
> ------------------------------------------------------------------------------
> Virtualization& Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
>
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
> http://www.doteasy.com
|