How to add a new node

Asked by Mike

Is there a simple way to add a new node to a stado cluster?

I don't need to redistribute the tables from the existing nodes (although I suspect most others using stado may need to do so if adding a new node). In my case all I think I need to do is create the table schema on the new node and make the metadb aware of it.

Is there a script that will do this?

Mike

Question information

Language:
English Edit question
Status:
Solved
For:
Stado Edit question
Assignee:
No assignee Edit question
Solved by:
Mike
Solved:
Last query:
Last reply:
Revision history for this message
Jim Mlodgenski (jim-cirrusql) said :
#1

There isn't a script to do that, but you can hack the system catalogs to get there. Are you just going to be added new tables to the new node? I can't think of a way to easily add a new node so that an existing table will be aware of it.

Revision history for this message
Mike (s-launchpadmike) said :
#2

Hi Jim

Yes, the idea is just to add brand new tables to the new node. The tables are created over time, so the "old" tables do not need to be present on the new node.

Will stado be ok with that (ie having old tables on old nodes, but not on the new one?) If I do a query that does a select from the same table on all nodes, wont the fact that its not present on the new node be a problem?

BTW I found some stub code for an API that looks like it adds or drops nodes, but its not implemented.
Its in:
SqlAddNodesToDB.java
and
SqlDropNodesFromDB.java

Any clues on how I can hack the sys catalogues for a new node :)

Revision history for this message
Jim Mlodgenski (jim-cirrusql) said :
#3

To add a node, first you'll need to modify stado.config for the new connection and increase the node count by 1. The you'll need to create a database on the new node with a name that matches the pattern Stado uses for example __DBNAME__N3. Then in the XDBSYS database on the coordinator, you'll just need to add a row to xsysdbnodes with the new nodeid. When you start Stado, you'll then be able to use the new node for any new tables you may add and any old tables will just continue to use the original nodes. Also remember, you will need to manually copy over any replicated tables to the new node because the optimizer will expect them to be there.

Revision history for this message
Mike (s-launchpadmike) said :
#4

Perfect, thanks.

Revision history for this message
Alvin Peng (pengalvin) said :
#5

Hi Jim,

After adding new nodes, is it a must to restart Stado?
Is it possible to do the initialization to new nodes without stopping Stado?
Any clues on the steps for the initialization?

Thank.

Revision history for this message
Jim Mlodgenski (jim-cirrusql) said :
#6

Alvin,
  Yes, you will need to restart to pick up the new node. The coordinator caches the metadata information from the XDBSYS database so as you manually change data, it won't pick up the new values until you restart.

Revision history for this message
Alvin Peng (pengalvin) said :
#7

Hi Jim,

What about adding codes to caches the metadata information of the new nodes somewhere?
When there is new node added, we can add a command to inform the coordinator to refresh the metadata information?
If restart the coordinator, the clients connections will be broken, so it would be great if we can add nodes online.

Revision history for this message
Jim Mlodgenski (jim-cirrusql) said :
#8

I agree. Maybe something like
ALTER DATABASE foo REFRESH METADATA;