Bugs item #2806488, was opened at 2009-06-15 11:37
Message generated for change (Comment added) made by stmane
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2806488&group_id=56967
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: PF/runtime
Group: XML
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: John van Schie (johnvanschie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Some XML attributes not selectable.
Initial Comment:
MonetDB/XQuery Feb2009-SP2, Fedora Core 10 x86_64, 64 bit OID's, RPM install.
We have a MonetDB server that contains a fairly large (678 docs) collection of
small documents. When selecting attributes from elements within the documents,
some strange behaviour is noticed. It can be explained best with an query.
----
let $tasks := pf:collection('c2_log.xml')//success/ta...@duration]
for $task in $tasks
(: tasks should always have a xid and duration attribute when successful :)
where count($task/@*) != 2
return element {$task/name()} {$task/@*, $task}
----
<task duration="49506"><task duration="49506" xid="3"/></task>,
<task duration="24503"><task duration="24503" xid="799"/></task>,
<task duration="1531"><task duration="1531" xid="822"/></task>,
<task duration="5724"><task duration="5724" xid="7971"/></task>,
<task duration="439"><task duration="439" xid="8591"/></task>,
<task duration="510"><task duration="510" xid="8592"/></task>,
<task duration="1351"><task duration="1351" xid="8600"/></task>,
<task duration="749"><task duration="749" xid="8602"/></task>,
<task duration="2100"><task duration="2100" xid="22742"/></task>,
----
Thus we select all tasks that do not have two attributes and we see tasks
elements that have their xid attribute missing. But if we print the whole task
element, the missing xid attribute magically re-appears.
When we run the same query on a single document of the collection, we see the
same strange behaviour. We are not able to reproduce this behaviour by
exporting a problematic document and shredding it.
----------------------------------------------------------------------
>Comment By: Stefan Manegold (stmane)
Date: 2009-06-16 14:36
Message:
John,
could you please run the following queries on the same database and report
their results:
let $tasks := pf:collection('c2_log.xml')//success/ta...@xid]
for $task in $tasks
where count($task/@*) != 2
return element {$task/name()} {$task/@*, $task}
count(pf:collection('c2_log.xml')//success/task)
count(pf:collection('c2_log.xml')//success/ta...@*])
count(pf:collection('c2_log.xml')//success/task[count(@*) < 2])
count(pf:collection('c2_log.xml')//success/task[count(@*) = 2])
count(pf:collection('c2_log.xml')//success/task[count(@*) > 2])
count(pf:collection('c2_log.xml')//success/task[count(@*) != 2])
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2009-06-16 13:56
Message:
Hi John,
I checked the compile time part of the query which looks fine. So it most
certainly is a runtime problem.
Out of curiosity, what happens if you modify your query to check for the
xid attributes directly?
let $tasks := pf:collection('c2_log.xml')//success/ta...@duration]
for $task in $tasks
where count($task/@xid) != 1
return element {$task/name()} {$task/@*, $task}
And what happens if you choose a newer compiler version to run the query?
To do that just compile your query with pf and feed the resulting MIL code
to the old runtime.
----------------------------------------------------------------------
Comment By: John van Schie (johnvanschie)
Date: 2009-06-16 11:58
Message:
Stefan,
The 678 documents are shredded incrementally into the same collection.
After each tool run, a XML log file is created and shredded in MonetDB,
into the log collection.
The only other operation performed on the log collection is copy; A
selection on the collection ( pf:collection("c2_log.xml")//run ) is
executed and the XML that is returned is stored to file. This file is than
read-only shredded in the database, but *not* into the log collection.
No XQuery updates are performed on the log document, although the
documents are flagged 'updateable'.
If you need more information (the server is still running), please let me
know.
John
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2009-06-16 10:34
Message:
John,
how has your collection initially been created?
a) shredding all 678 docs in one go?
b) shredding the 678 docs incrementally into the same collection (e.g., in
small batches or one at a time)?
Have there been updates on the collection during (incremental) and/or
after shredding (all documents)?
If so, have those updates touched/altered the data that now appears to be
inconsistent, i.e., the task elements with two attributes of with only one
appears to be directly addressable?
Thanks!
Stefan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2806488&group_id=56967
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs