Projects tigase _server server-core Issues #790
Adjust naming of cluster_nodes table (#790)
Closed
Andrzej Wójcik (Tigase) opened 7 years ago
Due Date
2017-04-06

All tables created/used by Tigase XMPP Server should use tig_ prefix. This task is to rename cluster_nodes table to tig_cluster_nodes and adjust code responsible for manipulating data within this table.

Andrzej Wójcik (Tigase) commented 7 years ago

I created new table tig_cluster_nodes in database schema files with same columns as were created for cluster_nodes by ClConSQLRepository and updated name of table used by @ClConSQLRepository@. Repository is no longer responsible for creation of SQL tables, however I left SQL queries there as queries are simple and I haven't seen any benefit of stored procedures in this case.

Same was done for @tigase-mongodb@.

wojciech.kapcia@tigase.net commented 7 years ago

Andrzej, change looks good (and class is saner without all the SQL…) however I have one suggestion - maybe we could/should use tigase.sys.TigaseRuntime#shutdownTigase(java.lang.String[]) for universal handling of termination errors? AFAIR it was introduced by you a while back so would make sense to use the same thing and be uniform? (maybe even changing it to use System.err instead of logger?)

Afterwards can you assign it to Daniel to update the documentation (or do it yourself) and close the issue?

Andrzej Wójcik (Tigase) commented 7 years ago

I've changed shutdown mechanism in ClConSQLRepository to use tigase.sys.TigaseRuntime#shutdownTigase(java.lang.String[]) and updated documentation.

Daniel, please review my changes and adjust them if needed.

Daniel Wisnewski commented 7 years ago

Looks good to me, closing issue.

wojciech.kapcia@tigase.net commented 7 years ago

Derby is missing actually… Yes, I know it's completely bonkers to use Derby in such configuration, but AFAIR by default we allow starting server in "cluster mode", and this requires tig_cluster_nodes no matter which DB is used… hence error:

  =============================================================================
  ERROR! Terminating the server process.
  Problem initializing the server: missing tig_cluster_nodes table on jdbc:derby:tigasetestdb;create=true
  Please fix the problem and start the server again.
  =============================================================================

And because we are no strict about configuration/what's loaded and not it simply results in shutting of the server instead of ignoring this tiny issue…

Andrzej Wójcik (Tigase) commented 7 years ago

I've added tig_cluster_nodes to database schema for DerbyDB as it is possible to start Derby in server mode and then connect Tigase to this server. This way it could be possible to run a cluster, however Tigase jars would need to be added to DerbyDB server installation (to add implementations of stored procedures, if I'm correct).

wojciech.kapcia@tigase.net commented 7 years ago

Andrzej Wójcik wrote:

I've added tig_cluster_nodes to database schema for DerbyDB as it is possible to start Derby in server mode and then connect Tigase to this server.

Thank you.

This way it could be possible to run a cluster, however Tigase jars would need to be added to DerbyDB server installation (to add implementations of stored procedures, if I'm correct).

Correct.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
5150
Version
tigase-server-8.0.0
Spent time
17h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#790
Please wait...
Page is in error, reload to recover