Bugs item #2141000, was opened at 2008-10-01 22:05
Message generated for change (Comment added) made by lafanasi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2141000&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: XML
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Loredana Afanasiev (lafanasi)
Assigned to: Nobody/Anonymous (nobody)
Summary: XQ: problem with deleting a doc

Initial Comment:
Hi,

Deleting a document from a collection seems to be buggy, see the following 
sequence of steps:

bulk-loading a collection
xquery$
for $d in doc("/scratch/PolitiekeData/MotiesTweedeKamer/xq/dir.xml")//doc
return
pf:add-doc(fn:concat("/scratch/PolitiekeData/MotiesTweedeKamer/XML/",$d/@name), 
fn:string($d/@name), "MotiesTweedeKamer", 0)

adding a document to the collection, by mistake
xquery$
pf:add-doc(fn:concat("/scratch/PolitiekeData/MotiesTweedeKamer/","allemoties.xml"),"MotiesTweedeKamer")

noticed the mistake
xquery$ pf:collections()
<collection updatable="false" size="217 MiB" 
numDocs="27947">MotiesTweedeKamer</collection>,

delete the document from the collection
xquery$ pf:del-doc("MotiesTweedeKamer")

now, is this doc deleted? The number of document in the collection indeed 
decreased with one, but then the size of the collection is the same.
xquery$ pf:collections()
<collection updatable="false" size="217 MiB" 
numDocs="27946">MotiesTweedeKamer</collection>,

lets' test it again. oops.
xquery$ fn:count(fn:collection("MotiesTweedeKamer")//document)
55892

:) I am sure there is a quicker way to getting this bug.

cheers,
l.

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

>Comment By: Loredana Afanasiev (lafanasi)
Date: 2008-10-02 12:37

Message:
Forgot to say:
# Installation packadge: MonetDB-Aug2008-SuperBall.tar.bz2


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

Comment By: Stefan Manegold (stmane)
Date: 2008-10-01 22:56

Message:
Loredana,

the (physical) size of the collection remains the same after deleting a
single document as it would be too expensive to "clean-up" the physical
storage, which would require copying the whole collection.

The deleted document should (logically) not be visible anymore, though,
and that seems to be correct given the values of the "numDoc" attribute in
the results of both pf:collections() calls.

Not knowing your collection I cannot interpret what you last query is
supposed to show --- I only see that 55892 = 2 * 27946 ...

Moreover which version of MonetDB/XQuery (resp. Pathfinder) are you
using?
You did not indicate that via the "Group:" selection in the header of this
bug report.

Stefan


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2141000&group_id=56967

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to