Project

General

Profile

Task #5150

Adjust naming of cluster_nodes table

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
Due date:
2017-04-07
% Done:

100%

Estimated time:
Database:
n/a

Description

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.


Related issues

Related to Tigase XMPP Server - Task #4995: Extract AMP repository schema to external fileClosed2017-03-202017-04-06

Associated revisions

Revision 45f00e41 (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

#5150: renamed cluster_nodes to tig_cluster_nodes and moved table creation to database schema files

Revision b6270f7f (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

#5150: replaced cluster_nodes collection with tig_cluster_nodes

Revision bbc90d92 (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

#5150: change shutdown mechanism to use default shutdown mechanism and update to documentation

Revision 68fd79dd (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

#5150: added tig_cluster_nodes table to DerbyDB schema

History

#1 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

  • Related to Task #4995: Extract AMP repository schema to external file added

#2 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

  • Due date changed from 2017-04-04 to 2017-03-31
  • Status changed from New to In QA
  • Assignee changed from Andrzej Wójcik to Wojciech Kapcia
  • % Done changed from 0 to 100

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@.

#3 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Due date changed from 2017-03-31 to 2017-04-07
  • Status changed from In QA to Feedback
  • Assignee changed from Wojciech Kapcia to Andrzej Wójcik

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?

#4 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

  • Status changed from Feedback to In QA
  • Assignee changed from Andrzej Wójcik to Daniel Wisnewski

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.

#5 Updated by Daniel Wisnewski IoT 1 Cloud about 2 years ago

  • Status changed from In QA to Resolved

Looks good to me, closing issue.

#6 Updated by Daniel Wisnewski IoT 1 Cloud about 2 years ago

  • Status changed from Resolved to Closed

#7 Updated by Wojciech Kapcia TigaseTeam about 2 years ago

  • Status changed from Closed to Feedback
  • Assignee changed from Daniel Wisnewski to Andrzej Wójcik

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…

#8 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam about 2 years ago

  • Status changed from Feedback to In QA
  • Assignee changed from Andrzej Wójcik to Wojciech Kapcia

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).

#9 Updated by Wojciech Kapcia TigaseTeam almost 2 years ago

  • Status changed from In QA to Closed

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.

Also available in: Atom PDF