Dear Toni,

Your ALTER TABLE is what we call a cross-database write.  Sequoia does not 
support them, which is why you are getting an error.  You need to connect to 
the database to which you are writing before issuing ALTER TABLE.

Here's why Sequoia works this way.  Sequoia virtualizes individual databases, 
not entire servers.  There is a recovery log for each database which stores all 
updates made by applications connected to that database.  So, your  ALTER TABLE 
command, if it were to succeed, would be stored in the MCDP recovery log.  If 
you were to recover an MCDP backend, this would mean the ALTER TABLE would 
replay and alter IPLAT.  In turn, if you were to recover IPLAT the ALTER TABLE 
would be missing.

As you showed in your example there is no apparent problem reading across 
databases but there's a subtle issue here as well.   IPLAT could be off-line, 
in which case your describe command might return out-of-date results.

In summary, your applications should always connect directly to the database(s) 
they alter or read.

Cheers, Robert


On 5/24/08 12:10 AM, "Toni Menendez Lopez" <[EMAIL PROTECTED]> wrote:

Hello, everybody...

I am working with sequoia 2.10.10, against MySQL with 2 backends working.

And, I am having problems when I try to do an ALTER TABLE from one DATABASE to 
other DATABASE.

Here is the example, I am inside MCDP database and when I try to do an ALTER of 
the table USER in IPLAT database I get the following error :

An error occured while executing SQL query 
(org.continuent.sequoia.common.exceptions.driver.DriverSQLException: Message of 
cause: write request 562949953421335 failed:
Backend mcdp - BackendWorkerThread for backend 'mibeas01_data_01' with RAIDb 
level:1 failed (Unable to find table iplat.user in database schema, rejecting 
query alter table iplat.user add colum pp bigint(20) unsigned;/.)
)

Any idea where can be the problem ?

Here are commands used.-

jdbc:sequoia://mibeas01_data,mibeas02_data/mcdp?preferredController=mibeas02_data
 (mcdp) > desc iplat.user;
+------------------+---------------------+------+-----+---------+----------------+
| Field            | Type                | Null | Key | Default | Extra         
 |
+------------------+---------------------+------+-----+---------+----------------+
| id               | bigint(20) unsigned |      | PRI |         | 
auto_increment |
| name             | varchar(45)         |      | UNI |         |               
 |
| password         | varchar(45)         |      |     |         |               
 |
| roletype         | tinyint(4) unsigned |      |     | 0       |               
 |
| sprole_fk        | bigint(20) unsigned | YES  | MUL |         |               
 |
| icorole_fk       | bigint(20) unsigned | YES  | MUL |         |               
 |
| isprole_fk       | bigint(20) unsigned | YES  | MUL |         |               
 |
| user_fk          | bigint(20) unsigned |      |     | 0       |               
 |
| email            | varchar(90)         | YES  |     |         |               
 |
| status           | tinyint(4) unsigned |      |     | 0       |               
 |
| trusted          | tinyint(4) unsigned |      |     | 0       |               
 |
| validationMSISDN | varchar(15)         | YES  |     |         |               
 |
| cmsSP            | varchar(255)        | YES  |     |         |               
 |
+------------------+---------------------+------+-----+---------+----------------+
Query executed in 0 s 73 ms .
jdbc:sequoia://mibeas01_data,mibeas02_data/mcdp?preferredController=mibeas02_data
 (mcdp) > select * from iplat.user;
+----+-------+----------+----------+-----------+------------+------------+---------+-------+--------+---------+------------------+-------+
| id | name  | password | roletype | sprole_fk | icorole_fk | isprole_fk | 
user_fk | email | status | trusted | validationMSISDN | cmsSP |
+----+-------+----------+----------+-----------+------------+------------+---------+-------+--------+---------+------------------+-------+
| 1  | admin | admin    | 0        |           |            |            | 0    
   |       | 1      | 0       |                  |       |
+----+-------+----------+----------+-----------+------------+------------+---------+-------+--------+---------+------------------+-------+
Query executed in 0 s 77 ms .
jdbc:sequoia://mibeas01_data,mibeas02_data/mcdp?preferredController=mibeas02_data
 (mcdp) > alter table iplat.user add colum pp bigint(20) unsigned;
An error occured while executing SQL query 
(org.continuent.sequoia.common.exceptions.driver.DriverSQLException: Message of 
cause: write request 562949953421335 failed:
Backend mcdp - BackendWorkerThread for backend 'mibeas01_data_01' with RAIDb 
level:1 failed (Unable to find table iplat.user in database schema, rejecting 
query alter table iplat.user add colum pp bigint(20) unsigned;/.)
)
jdbc:sequoia://mibeas01_data,mibeas02_data/mcdp?preferredController=mibeas02_data
 (mcdp) >


--
Robert Hodges, CTO, Continuent, Inc.
Email:  [EMAIL PROTECTED]
Mobile:  +1-510-501-3728  Skype:  hodgesrm
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to