[xwiki-devs] [VOTE] Apply XWIKI-2006:Allows to configurate name of database schema
Hi all, I would like the point of view of every ones for the patch provided in http://jira.xwiki.org/jira/browse/XWIKI-2006 by Ruslan Shevchenko (configurated_db_schema_06.patch). It allows to force the name of the database in the xwiki.cfg file. Except for some very minor Checkstyle still remaining, the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason. For that reason and also because it touch one of the deepest part of XWiki platform I want to validate a vote to apply it in the trunk. It also add database names prefix support which is great. Here my +1. -- Thomas Mortagne
Thomas Mortagne wrote:
the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason. Here my +1.
Thomas Mortagne
Does that mean there will be even more (for me, as a non-techie-user, there are already too much) connections to my database (MySQL)? -- View this message in context: http://www.nabble.com/-VOTE--Apply-XWIKI-2006%3AAllows-to-configurate-name-o... Sent from the XWiki- Dev mailing list archive at Nabble.com.
On Sat, 15 Mar 2008 07:32:20 -0700 (PDT), squirrely_wrath wrote
Thomas Mortagne wrote:
the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason. Here my +1.
Thomas Mortagne
Does that mean there will be even more (for me, as a non-techie-user, there are already too much) connections to my database (MySQL)?
Number of connections left the same. (And can be configurated in hibernate config). (Changes are: we set name of database during creating/'getting from pool' of each connection [which is during each transaction])
-- View this message in context: http://www.nabble.com/-VOTE--Apply-
XWIKI-2006%3AAllows-to-configurate-name-of-database-schema-tp16067758p16068577.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
There is no committers interested in this subject ? On Sat, Mar 15, 2008 at 2:02 PM, Thomas Mortagne <[email protected]> wrote:
Hi all,
I would like the point of view of every ones for the patch provided in http://jira.xwiki.org/jira/browse/XWIKI-2006 by Ruslan Shevchenko (configurated_db_schema_06.patch).
It allows to force the name of the database in the xwiki.cfg file. Except for some very minor Checkstyle still remaining, the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason.
For that reason and also because it touch one of the deepest part of XWiki platform I want to validate a vote to apply it in the trunk.
It also add database names prefix support which is great.
Here my +1.
-- Thomas Mortagne
-- Thomas Mortagne
I'll take a look at it. I just read all the mails regarding this issue yesterday, so I'm already familiar with the problem. Thomas Mortagne wrote:
There is no committers interested in this subject ?
On Sat, Mar 15, 2008 at 2:02 PM, Thomas Mortagne <[email protected]> wrote:
Hi all,
I would like the point of view of every ones for the patch provided in http://jira.xwiki.org/jira/browse/XWIKI-2006 by Ruslan Shevchenko (configurated_db_schema_06.patch).
It allows to force the name of the database in the xwiki.cfg file. Except for some very minor Checkstyle still remaining, the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason.
For that reason and also because it touch one of the deepest part of XWiki platform I want to validate a vote to apply it in the trunk.
It also add database names prefix support which is great.
Here my +1.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi. Some remarks: I think !"".equals(s) is better than s.length()!=0 because more semantic and easy to read. What is "xwiki.dv" config option? (what does "dv" mean?). I think we need more meaningful params than "xwiki.db" and "xwiki.dv" (something like xwiki.db.mainname, xwiki.db.forceset ?) Why we need to force setDatabase in non virtual mode? Is it only for fix security issues? Why we can't simply deny setDatabase in non virtual mode? Thomas Mortagne wrote:
Hi all,
I would like the point of view of every ones for the patch provided in http://jira.xwiki.org/jira/browse/XWIKI-2006 by Ruslan Shevchenko (configurated_db_schema_06.patch).
It allows to force the name of the database in the xwiki.cfg file. Except for some very minor Checkstyle still remaining, the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason.
For that reason and also because it touch one of the deepest part of XWiki platform I want to validate a vote to apply it in the trunk.
It also add database names prefix support which is great.
Here my +1.
-- Artem Melentyev
On Thu, Mar 20, 2008 at 4:11 PM, Artem Melentyev <[email protected]> wrote:
Hi.
Some remarks: I think !"".equals(s) is better than s.length()!=0 because more semantic and easy to read. What is "xwiki.dv" config option? (what does "dv" mean?).
I think dv is an error in this patch, it should be db (correct me if i'm wrong). Anyway I will not apply this patch without any modifications and tests, plus it has to be recreated based on last source code from trunk. This mail is more to validate the concept of this implementation.
I think we need more meaningful params than "xwiki.db" and "xwiki.dv" (something like xwiki.db.mainname, xwiki.db.forceset ?)
Why we need to force setDatabase in non virtual mode? Is it only for fix security issues? Why we can't simply deny setDatabase in non virtual mode?
What do you mean ? Actually setDatabase is never call in non virtual mode, it is forced in this patch only when a property says that XWiki has to use a provided database and not the default hibernate configuration file one.
Thomas Mortagne wrote:
Hi all,
I would like the point of view of every ones for the patch provided in http://jira.xwiki.org/jira/browse/XWIKI-2006 by Ruslan Shevchenko (configurated_db_schema_06.patch).
It allows to force the name of the database in the xwiki.cfg file. Except for some very minor Checkstyle still remaining, the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason.
For that reason and also because it touch one of the deepest part of XWiki platform I want to validate a vote to apply it in the trunk.
It also add database names prefix support which is great.
Here my +1.
-- Artem Melentyev
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Thu, 20 Mar 2008 20:11:23 +0500, Artem Melentyev wrote
Hi.
Some remarks: I think !"".equals(s) is better than s.length()!=0 because more semantic and easy to read. What is "xwiki.dv" config option? (what does "dv" mean?). I think we need more meaningful params than "xwiki.db" and "xwiki.dv"
Хmm, it's xwiki.dv in patch ? Ohh, it's must be xwiki.db as in my working copy.
(something like xwiki.db.mainname, xwiki.db.forceset ?)
Why we need to force setDatabase in non virtual mode?
Because we want set name of database. It is what this patch must do. I'm afraid this answer is not ideall for you. May be next sentence help: it is impossible to set database in hibernate in other way, than do all functionality, which is in 'setDatabase()' [Alternative is rewrite configuration part of hibernate]
Is it only for fix security issues?
Let's imagine that we does not call setDatabase in this case setting database will be possible via next procedure: -- change name in hibernate config -- set same name to xwiki.db (to call updateSchema with correct database) (and yes, it can be insecure) With call of setDatabase we a) does not require from user to change hibernate config. b) prevent call of setDatabase from user code. (security) Note, that only change name in hibernate config is incorrect and in general will not work, because updateScheme in some cases will generate full name of tables (with schema part) which we can't deduce and can't get from hibernate.
Thomas Mortagne wrote:
Hi all,
I would like the point of view of every ones for the patch provided in http://jira.xwiki.org/jira/browse/XWIKI-2006 by Ruslan Shevchenko (configurated_db_schema_06.patch).
It allows to force the name of the database in the xwiki.cfg file. Except for some very minor Checkstyle still remaining, the only "problem" for me is than if this feature is enabled the number of hibernates query in non-virtual mode grows to one more by hibernate transaction used to ensure the selected database is the provided one. Note that this is not worst than actual virtual mode which do almost exactly the same thing for the same reason.
For that reason and also because it touch one of the deepest part of XWiki platform I want to validate a vote to apply it in the trunk.
It also add database names prefix support which is great.
Here my +1.
-- Artem Melentyev _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
Ok. +1 I think it is acceptable way. rssh wrote:
Why we need to force setDatabase in non virtual mode?
Because we want set name of database. It is what this patch must do.
I'm afraid this answer is not ideall for you. May be next sentence help: it is impossible to set database in hibernate in other way, than do all functionality, which is in 'setDatabase()'
[Alternative is rewrite configuration part of hibernate]
Is it only for fix security issues?
Let's imagine that we does not call setDatabase in this case setting database will be possible via next procedure: -- change name in hibernate config -- set same name to xwiki.db (to call updateSchema with correct database)
(and yes, it can be insecure)
With call of setDatabase we a) does not require from user to change hibernate config. b) prevent call of setDatabase from user code. (security)
Note, that only change name in hibernate config is incorrect and in general will not work, because updateScheme in some cases will generate full name of tables (with schema part) which we can't deduce and can't get from hibernate.
-- Artem Melentyev
participants (5)
-
Artem Melentyev -
rssh -
Sergiu Dumitriu -
squirrely_wrath -
Thomas Mortagne