Delete old entries in CouchDB

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
  • April 24, 2018 at 5:05 AM #28383

    Paolo
    Participant

    CouchDB sync is a great feature of Tap Forms and it works like a charm. I read the CouchDB documentation and I noticed that when a entry has been deleted by the user it still stored in the database. This cause a large space consumption. My database “has just 8.551 docs and 18.266 deleted docs” stored not more useful for me. How can I definitely delete the old deleted entries (including attached files) from the database using Project Fauxton in order to minimize the DB space? I’m not familiar with Apache, can you please help me?

    April 24, 2018 at 5:19 AM #28384

    Paolo
    Participant

    I already run compact function without success.

    April 24, 2018 at 9:05 AM #28386

    Brendan
    Keymaster

    The reason it keeps them around is because you might have other devices that come online that have the data in them still that need to be deleted. Without them being kept around, CouchbaseLite would think that they are brand new and would re-add them again.

    You could delete the database from CouchDB and then re-sync and see how that goes. Since you’ve compacted, the old revisions JSON data have been cleared out, so should take up less space.

    April 24, 2018 at 9:06 AM #28387

    Brendan
    Keymaster

    There is actually a purge function which I should enable. I wrote code to purge all deleted data from the database on the local device. But in order for that to work properly you would definitely then need to delete the database from CouchDB. I just don’t have a switch in the program to enable it just yet. I was using it mostly for testing purposes. But perhaps I could add a switch on the Compact Database function screen to enable purging.

    April 24, 2018 at 10:54 AM #28392

    Paolo
    Participant

    Clear! As always, thank you :-)

Viewing 4 reply threads

You must be logged in to reply to this topic.