Evan | 7 Apr 2009 08:39
Picon

Sedna

HI

We are running sedna on a fedora platform.

Our buff sizes are correct but we are still experiencing problems with speed and
saving documents.

On one transaction at a time , it almost take up to to a minute and a half to
save a transaction.

Wat should i look out for ?

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
Ivan Shcheklein | 7 Apr 2009 09:34
Picon
Gravatar

Re: Sedna

Hi Evan,

Well, we need some details to help you.

What version of Sedna do you use? What number of buffers do you use? What API do you use?, etc ...

Send us also event log files (SEDNA_DIR/data/event***.log).

Our buff sizes are correct but we are still experiencing problems with speed and
saving documents.

"Saving" = "Bulk load"? What kind of files are you saving? Do you use collections? ...

On one transaction at a time , it almost take up to to a minute and a half to
save a transaction.

What does exactly "save a transaction" mean?


Ivan Shcheklein,
Sedna Team
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@...
https://lists.sourceforge.net/lists/listinfo/sedna-discussion
SourceForge.net | 8 Apr 2009 17:43
Picon
Favicon

[ sedna-Bugs-2744564 ] INSERT trigger is called upon UPDATE REPLACE

Bugs item #2744564, was opened at 2009-04-08 17:43
Message generated for change (Tracker Item Submitted) made by drideru
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Triggers
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Konstantin (drideru)
Assigned to: Nobody/Anonymous (nobody)
Summary: INSERT trigger is called upon UPDATE REPLACE

Initial Comment:
The INSERT BEFORE TRIGGER is called when the UPDATE REPLACE is executed. Found out because there might be
another bug, which I will post separately.

CREATE TRIGGER "rwipinfdir:500_insert_site_before"  
BEFORE INSERT  
ON doc("infrastructure")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:insert new id:)
	let $node:=
		<site>
			{$node/ <at> *,
			 attribute {"id"} {concat("site_id_", $idnext)},
			 $node/*}
		</site>

(:insert name:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>

(:insert description:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not customized yet.</description>
		</site>

(:insert log:)
	...
	let $node:=
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>

	
	return $node;	 

}

The INSERT operation is working nicely

UPDATE INSERT <site/> into doc("mydoc")

The UPDATE REPLACE operation strangely (at least for me) executes also the INSERT BEFORE trigger. With
that only section with LOG creates the error.

2009/04/08 17:31:31 database query/update failed (SEDNA Message: ERROR SE3205
Trigger action tries to update a document/collection that is currently updating by the outer update statement.
Details: mydoc

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
SourceForge.net | 8 Apr 2009 17:49
Picon
Favicon

[ sedna-Bugs-2744564 ] INSERT trigger is called upon UPDATE REPLACE

Bugs item #2744564, was opened at 2009-04-08 17:43
Message generated for change (Comment added) made by drideru
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Triggers
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Konstantin (drideru)
Assigned to: Nobody/Anonymous (nobody)
Summary: INSERT trigger is called upon UPDATE REPLACE

Initial Comment:
The INSERT BEFORE TRIGGER is called when the UPDATE REPLACE is executed. Found out because there might be
another bug, which I will post separately.

CREATE TRIGGER "rwipinfdir:500_insert_site_before"  
BEFORE INSERT  
ON doc("infrastructure")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:insert new id:)
	let $node:=
		<site>
			{$node/ <at> *,
			 attribute {"id"} {concat("site_id_", $idnext)},
			 $node/*}
		</site>

(:insert name:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>

(:insert description:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not customized yet.</description>
		</site>

(:insert log:)
	...
	let $node:=
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>

	
	return $node;	 

}

The INSERT operation is working nicely

UPDATE INSERT <site/> into doc("mydoc")

The UPDATE REPLACE operation strangely (at least for me) executes also the INSERT BEFORE trigger. With
that only section with LOG creates the error.

2009/04/08 17:31:31 database query/update failed (SEDNA Message: ERROR SE3205
Trigger action tries to update a document/collection that is currently updating by the outer update statement.
Details: mydoc

----------------------------------------------------------------------

>Comment By: Konstantin (drideru)
Date: 2009-04-08 17:49

Message:
Oh no, will not post the other bug/?. it is already described here. it
appears when the <log> section is inserted. it has two levels.

it does not appear if only <name> or <description> is inserted (UPDATE
REPLACE only).

So totally two bugs.
TRIGGER INSERT BEFORE is called upon UPDATE REPLACE.
Adding a subnode of more than one level deep in this trigger, when it is
called upon UPDATE REPLACE, causes the error SE3205.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
SourceForge.net | 8 Apr 2009 21:45
Picon
Favicon

[ sedna-Bugs-2744564 ] INSERT trigger is called upon UPDATE REPLACE

Bugs item #2744564, was opened at 2009-04-08 19:43
Message generated for change (Comment added) made by shcheklein
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Triggers
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Konstantin (drideru)
Assigned to: Nobody/Anonymous (nobody)
Summary: INSERT trigger is called upon UPDATE REPLACE

Initial Comment:
The INSERT BEFORE TRIGGER is called when the UPDATE REPLACE is executed. Found out because there might be
another bug, which I will post separately.

CREATE TRIGGER "rwipinfdir:500_insert_site_before"  
BEFORE INSERT  
ON doc("infrastructure")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:insert new id:)
	let $node:=
		<site>
			{$node/ <at> *,
			 attribute {"id"} {concat("site_id_", $idnext)},
			 $node/*}
		</site>

(:insert name:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>

(:insert description:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not customized yet.</description>
		</site>

(:insert log:)
	...
	let $node:=
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>

	
	return $node;	 

}

The INSERT operation is working nicely

UPDATE INSERT <site/> into doc("mydoc")

The UPDATE REPLACE operation strangely (at least for me) executes also the INSERT BEFORE trigger. With
that only section with LOG creates the error.

2009/04/08 17:31:31 database query/update failed (SEDNA Message: ERROR SE3205
Trigger action tries to update a document/collection that is currently updating by the outer update statement.
Details: mydoc

----------------------------------------------------------------------

>Comment By: Ivan Shcheklein (shcheklein)
Date: 2009-04-08 23:45

Message:
Konstantin, could you provide us an example of the document and exact
queries to reproduce the issue on? 

----------------------------------------------------------------------

Comment By: Konstantin (drideru)
Date: 2009-04-08 19:49

Message:
Oh no, will not post the other bug/?. it is already described here. it
appears when the <log> section is inserted. it has two levels.

it does not appear if only <name> or <description> is inserted (UPDATE
REPLACE only).

So totally two bugs.
TRIGGER INSERT BEFORE is called upon UPDATE REPLACE.
Adding a subnode of more than one level deep in this trigger, when it is
called upon UPDATE REPLACE, causes the error SE3205.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
SourceForge.net | 8 Apr 2009 22:15
Picon
Favicon

[ sedna-Bugs-2744564 ] INSERT trigger is called upon UPDATE REPLACE

Bugs item #2744564, was opened at 2009-04-08 17:43
Message generated for change (Comment added) made by drideru
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Triggers
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Konstantin (drideru)
Assigned to: Nobody/Anonymous (nobody)
Summary: INSERT trigger is called upon UPDATE REPLACE

Initial Comment:
The INSERT BEFORE TRIGGER is called when the UPDATE REPLACE is executed. Found out because there might be
another bug, which I will post separately.

CREATE TRIGGER "rwipinfdir:500_insert_site_before"  
BEFORE INSERT  
ON doc("infrastructure")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:insert new id:)
	let $node:=
		<site>
			{$node/ <at> *,
			 attribute {"id"} {concat("site_id_", $idnext)},
			 $node/*}
		</site>

(:insert name:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>

(:insert description:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not customized yet.</description>
		</site>

(:insert log:)
	...
	let $node:=
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>

	
	return $node;	 

}

The INSERT operation is working nicely

UPDATE INSERT <site/> into doc("mydoc")

The UPDATE REPLACE operation strangely (at least for me) executes also the INSERT BEFORE trigger. With
that only section with LOG creates the error.

2009/04/08 17:31:31 database query/update failed (SEDNA Message: ERROR SE3205
Trigger action tries to update a document/collection that is currently updating by the outer update statement.
Details: mydoc

----------------------------------------------------------------------

>Comment By: Konstantin (drideru)
Date: 2009-04-08 22:15

Message:
Hi, Ivan!

here is the code to execute.

---------------------------- CREATE AN EMPTY DOCUMENT
-------------------------------
create document "test"

---------------------------- CREATE TRIGGER
-----------------------------------------

declare namespace testns="TEST_UPDATE_REPLACE";

CREATE TRIGGER "testns:500_insert_site_before"  
BEFORE INSERT  
ON doc("test")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:first check if there are some elements:)
(:that are not allowed to be insert by the user:)

(:insert required subnodes and attributes if they are missing:)

(:insert name:)
	let $node:=if(empty($node/name))
	then
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>
	else $node

(:insert description:)
	let $node:=if(empty($node/description))
	then
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not
customized yet.</description>
		</site>
	else $node

(:insert log:)
	let $user := se:get-property("$user")
	let $partner:=doc("test")//partner[ <at> id=$user]
	let $timestamp:=adjust-dateTime-to-timezone(current-dateTime(),
xs:dayTimeDuration('PT0H'))
	
	let $node:=if(empty($node/log))
	then (
		if(exists($partner))
		then
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>
		else
			error(xs:QName("testns:insert_site_before"),
				concat("Failed to locate the partner node for the current user '",
$user, "'."))
	)
	else $node
	
	return $node;	 

}

------------------------------- INSERT NEW NODES
------------------------------------

update insert <partner id="SYSTEM"/> into doc("test")
update insert <site/> into doc("test")

------------------------------- UPDATE THE NODE
------------------------------------

update replace $site in doc("test")/site with
<site>
 <name>new site</name>
 <description>The new site was created but the information was not
customized yet.</description>
</site>

----------------------------------------------------------------------

Comment By: Ivan Shcheklein (shcheklein)
Date: 2009-04-08 21:45

Message:
Konstantin, could you provide us an example of the document and exact
queries to reproduce the issue on? 

----------------------------------------------------------------------

Comment By: Konstantin (drideru)
Date: 2009-04-08 17:49

Message:
Oh no, will not post the other bug/?. it is already described here. it
appears when the <log> section is inserted. it has two levels.

it does not appear if only <name> or <description> is inserted (UPDATE
REPLACE only).

So totally two bugs.
TRIGGER INSERT BEFORE is called upon UPDATE REPLACE.
Adding a subnode of more than one level deep in this trigger, when it is
called upon UPDATE REPLACE, causes the error SE3205.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
SourceForge.net | 8 Apr 2009 22:15
Picon
Favicon

[ sedna-Bugs-2744564 ] INSERT trigger is called upon UPDATE REPLACE

Bugs item #2744564, was opened at 2009-04-08 17:43
Message generated for change (Comment added) made by drideru
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Triggers
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Konstantin (drideru)
Assigned to: Nobody/Anonymous (nobody)
Summary: INSERT trigger is called upon UPDATE REPLACE

Initial Comment:
The INSERT BEFORE TRIGGER is called when the UPDATE REPLACE is executed. Found out because there might be
another bug, which I will post separately.

CREATE TRIGGER "rwipinfdir:500_insert_site_before"  
BEFORE INSERT  
ON doc("infrastructure")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:insert new id:)
	let $node:=
		<site>
			{$node/ <at> *,
			 attribute {"id"} {concat("site_id_", $idnext)},
			 $node/*}
		</site>

(:insert name:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>

(:insert description:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not customized yet.</description>
		</site>

(:insert log:)
	...
	let $node:=
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>

	
	return $node;	 

}

The INSERT operation is working nicely

UPDATE INSERT <site/> into doc("mydoc")

The UPDATE REPLACE operation strangely (at least for me) executes also the INSERT BEFORE trigger. With
that only section with LOG creates the error.

2009/04/08 17:31:31 database query/update failed (SEDNA Message: ERROR SE3205
Trigger action tries to update a document/collection that is currently updating by the outer update statement.
Details: mydoc

----------------------------------------------------------------------

>Comment By: Konstantin (drideru)
Date: 2009-04-08 22:15

Message:
Instead of "SYSTEM" please use your username if necessary.

----------------------------------------------------------------------

Comment By: Konstantin (drideru)
Date: 2009-04-08 22:15

Message:
Hi, Ivan!

here is the code to execute.

---------------------------- CREATE AN EMPTY DOCUMENT
-------------------------------
create document "test"

---------------------------- CREATE TRIGGER
-----------------------------------------

declare namespace testns="TEST_UPDATE_REPLACE";

CREATE TRIGGER "testns:500_insert_site_before"  
BEFORE INSERT  
ON doc("test")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:first check if there are some elements:)
(:that are not allowed to be insert by the user:)

(:insert required subnodes and attributes if they are missing:)

(:insert name:)
	let $node:=if(empty($node/name))
	then
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>
	else $node

(:insert description:)
	let $node:=if(empty($node/description))
	then
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not
customized yet.</description>
		</site>
	else $node

(:insert log:)
	let $user := se:get-property("$user")
	let $partner:=doc("test")//partner[ <at> id=$user]
	let $timestamp:=adjust-dateTime-to-timezone(current-dateTime(),
xs:dayTimeDuration('PT0H'))
	
	let $node:=if(empty($node/log))
	then (
		if(exists($partner))
		then
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>
		else
			error(xs:QName("testns:insert_site_before"),
				concat("Failed to locate the partner node for the current user '",
$user, "'."))
	)
	else $node
	
	return $node;	 

}

------------------------------- INSERT NEW NODES
------------------------------------

update insert <partner id="SYSTEM"/> into doc("test")
update insert <site/> into doc("test")

------------------------------- UPDATE THE NODE
------------------------------------

update replace $site in doc("test")/site with
<site>
 <name>new site</name>
 <description>The new site was created but the information was not
customized yet.</description>
</site>

----------------------------------------------------------------------

Comment By: Ivan Shcheklein (shcheklein)
Date: 2009-04-08 21:45

Message:
Konstantin, could you provide us an example of the document and exact
queries to reproduce the issue on? 

----------------------------------------------------------------------

Comment By: Konstantin (drideru)
Date: 2009-04-08 17:49

Message:
Oh no, will not post the other bug/?. it is already described here. it
appears when the <log> section is inserted. it has two levels.

it does not appear if only <name> or <description> is inserted (UPDATE
REPLACE only).

So totally two bugs.
TRIGGER INSERT BEFORE is called upon UPDATE REPLACE.
Adding a subnode of more than one level deep in this trigger, when it is
called upon UPDATE REPLACE, causes the error SE3205.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
SourceForge.net | 9 Apr 2009 17:00
Picon
Favicon

[ sedna-Bugs-2744564 ] INSERT trigger is called upon UPDATE REPLACE

Bugs item #2744564, was opened at 2009-04-08 17:43
Message generated for change (Comment added) made by drideru
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Triggers
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Konstantin (drideru)
Assigned to: Nobody/Anonymous (nobody)
Summary: INSERT trigger is called upon UPDATE REPLACE

Initial Comment:
The INSERT BEFORE TRIGGER is called when the UPDATE REPLACE is executed. Found out because there might be
another bug, which I will post separately.

CREATE TRIGGER "rwipinfdir:500_insert_site_before"  
BEFORE INSERT  
ON doc("infrastructure")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:insert new id:)
	let $node:=
		<site>
			{$node/ <at> *,
			 attribute {"id"} {concat("site_id_", $idnext)},
			 $node/*}
		</site>

(:insert name:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>

(:insert description:)
	let $node:=
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not customized yet.</description>
		</site>

(:insert log:)
	...
	let $node:=
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>

	
	return $node;	 

}

The INSERT operation is working nicely

UPDATE INSERT <site/> into doc("mydoc")

The UPDATE REPLACE operation strangely (at least for me) executes also the INSERT BEFORE trigger. With
that only section with LOG creates the error.

2009/04/08 17:31:31 database query/update failed (SEDNA Message: ERROR SE3205
Trigger action tries to update a document/collection that is currently updating by the outer update statement.
Details: mydoc

----------------------------------------------------------------------

>Comment By: Konstantin (drideru)
Date: 2009-04-09 17:00

Message:
Some more info.
I created a trigger

CREATE TRIGGER "rwipinfdir:000_replace_node_with_log_before"  
BEFORE REPLACE  
ON doc("test")//* 
FOR EACH NODE  
DO  
{

...
(:access the same "test" document here:)
let $var:=doc("test)/whatever

}

this with the replace generates an error that the trigger is trying to
modify/update (where?) the same document while the document is already
being updated.

I think at least querying the same document in the trigger must be
possible. I don't know if updating the same document error is a bug. I
would expect it to be.

----------------------------------------------------------------------

Comment By: Konstantin (drideru)
Date: 2009-04-08 22:15

Message:
Instead of "SYSTEM" please use your username if necessary.

----------------------------------------------------------------------

Comment By: Konstantin (drideru)
Date: 2009-04-08 22:15

Message:
Hi, Ivan!

here is the code to execute.

---------------------------- CREATE AN EMPTY DOCUMENT
-------------------------------
create document "test"

---------------------------- CREATE TRIGGER
-----------------------------------------

declare namespace testns="TEST_UPDATE_REPLACE";

CREATE TRIGGER "testns:500_insert_site_before"  
BEFORE INSERT  
ON doc("test")//site  
FOR EACH NODE  
DO  
{

	let $node:=$NEW

(:first check if there are some elements:)
(:that are not allowed to be insert by the user:)

(:insert required subnodes and attributes if they are missing:)

(:insert name:)
	let $node:=if(empty($node/name))
	then
		<site>
			{$node/ <at> *, $node/*}
			<name>new site</name>
		</site>
	else $node

(:insert description:)
	let $node:=if(empty($node/description))
	then
		<site>
			{$node/ <at> *, $node/*}
			<description>The new site was created but the information was not
customized yet.</description>
		</site>
	else $node

(:insert log:)
	let $user := se:get-property("$user")
	let $partner:=doc("test")//partner[ <at> id=$user]
	let $timestamp:=adjust-dateTime-to-timezone(current-dateTime(),
xs:dayTimeDuration('PT0H'))
	
	let $node:=if(empty($node/log))
	then (
		if(exists($partner))
		then
			<site>
				{$node/ <at> *, $node/*}
				<log>
					<createdBy>{string($partner/ <at> id)}</createdBy>
					<createTimestamp>{$timestamp}</createTimestamp>
					<modifiedBy>{string($partner/ <at> id)}</modifiedBy>
					<modifyTimestamp>{$timestamp}</modifyTimestamp>
				</log>
			</site>
		else
			error(xs:QName("testns:insert_site_before"),
				concat("Failed to locate the partner node for the current user '",
$user, "'."))
	)
	else $node
	
	return $node;	 

}

------------------------------- INSERT NEW NODES
------------------------------------

update insert <partner id="SYSTEM"/> into doc("test")
update insert <site/> into doc("test")

------------------------------- UPDATE THE NODE
------------------------------------

update replace $site in doc("test")/site with
<site>
 <name>new site</name>
 <description>The new site was created but the information was not
customized yet.</description>
</site>

----------------------------------------------------------------------

Comment By: Ivan Shcheklein (shcheklein)
Date: 2009-04-08 21:45

Message:
Konstantin, could you provide us an example of the document and exact
queries to reproduce the issue on? 

----------------------------------------------------------------------

Comment By: Konstantin (drideru)
Date: 2009-04-08 17:49

Message:
Oh no, will not post the other bug/?. it is already described here. it
appears when the <log> section is inserted. it has two levels.

it does not appear if only <name> or <description> is inserted (UPDATE
REPLACE only).

So totally two bugs.
TRIGGER INSERT BEFORE is called upon UPDATE REPLACE.
Adding a subnode of more than one level deep in this trigger, when it is
called upon UPDATE REPLACE, causes the error SE3205.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=713730&aid=2744564&group_id=129076

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
Nikolai Krot | 13 Apr 2009 17:01
Picon
Favicon

ERROR SE4211: Failed to create the database

Hello, guys

I've read through the mailing list and seen a few times the problem of SE4211
but seems it was never answered. So, hoping to get an answer, i'm posting the
question again.

I am trying to create a new database by running the following command:

0> se_cdb test
Creating a data base (it can take a few minutes)...
SEDNA Message: ERROR SE4211
Failed to create the database
Details: test

What shall i do to get the database created?

By the way:

1. While the command was being executed, i've seen appropriate directory
(test_files) be created and then deleted. Ghost?

2. when I reconfigured the location where databases are created (<sedna_data/>
in sedna/etc/sednacopnf.xml) to use a location in my home directory, the command
worked fine. Equally, the se_cdb command succeeded when I ran it from the root
account, which is definitely the bad practice. So I guess this can be an issue
of permissions. If yes, what are the correct permissions for sedna/data (and
other) directories?

Would greatly appreciate an answer

Best regards,
Nikolai Krot

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
Ivan Shcheklein | 13 Apr 2009 17:46
Picon
Gravatar

Re: ERROR SE4211: Failed to create the database

Hi Nikolai,

Default permissions:

drwxr-xr-x 2 root root 4.0K 2009-02-06 06:01 cfg
drwxr-xr-x 2 root root 4.0K 2009-02-06 06:01 data

At present, if Sedna was installed from root then only root has permissions to write into 'data' and 'cfg' folders. This means that only root is able to create [se_cdb process]  and run [se_sm process] databases.

You can properly adjust permissions on 'data' and 'cfg' to permit someone else to create and run databases.

If you don't like to create and start database from root you can create "sedna" user and install Sedna from it. In this case se_gov, se_cdb and se_sm utils will be run from "sedna" user.

0> se_cdb test
Creating a data base (it can take a few minutes)...
SEDNA Message: ERROR SE4211
Failed to create the database
Details: test

Send us also event log files (sedna/data/event*.log)

Ivan Shcheklein
Sedna Team

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@...
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Gmane