Size of the Berkley XMLDB container remains unchanged even after deleting document

51 Views Asked by At

I am using Berkeley dbxml 2.5.16. First I insert a document Test.xml to myDb.dbxml container.

dbxml> putDocument KEY_1 Test.xml`

Then I checked the file size of the container,

bash-3.2$ ls -ll ${dbxml-home}/myDb.dbxml   
rw-r----- 1 raga raga **679936** Jul 31 21:53 myDb.dbxml*

Then I removed the same document from the container,

dbxml> removedocument KEY_1  
Document deleted, name = KEY_1

Again I checked the file size of the container.

bash-3.2$ ls -ll ${dbxml-home}/myDb.dbxml  
rw-r----- 1 raga raga **679936** Jul 31 23:07 myDb.dbxml

My doubt is, even after removing document from the container the file size remains same. Is it means the file is not properly deleted or only the content got deleted but the reference is still there? (All the operation are done under transaction)

1

There are 1 best solutions below

0
On

I don't recall why that version is still retaining its size; one theory is that you may need to do a sync call on the container itself.

I would strongly recommend upgrading to the latest version (6.1.4). There are a ton of improvements to the database engine that take care of issues like this. You can get the latest at http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html .