Logo F2FInterview

CouchDB Interview Questions

Q   |   QA

No. Views are always read-only to databases and their documents. 

  • For a default linux/unix installation the logfiles are located here:

/usr/local/var/log/couchdb/couch.log

  • This is set in the default.ini file located here:

/etc/couchdb/default.ini

  • If you've installed from source and are running couchdb in dev mode the logfiles are located here:

YOUR-COUCHDB-SOURCE-DIRECTORY/tmp/log/couch.log 

Query the _all_docs view with startkey="_design/"&endkey="_design0". 

Not just yet. This topic is an ongoing discussion. The current situation is described in this post on the developer mailing list. Also, see this link collection on auth*topics for more information: Link_Collection_Authentication_and_Authorization

Often, CouchDB users expect that adding a document to a DB, then deleting that document will return the DB to its original state. However, this is not the case. Consider a two-DB case:

  •     Doc 1 inserted to DB A.
  •     DB A replicated to DB B.
  •     Doc 1 deleted from DB A.
  •     DB A replicated to DB B.

If inserting and then deleting a document returned the DB to the original state, the second replication from A to B would be "empty" and hence DB B would be unchanged, which means it would be out of sync with DB A.

To handle this case, CouchDB keeps a record of each document deleted, by keeping the document _id, _rev and _deleted=true. The data size per deleted doc depends on the number of revisions that CouchDB has to track plus the datasize for any data stored in the deleted revision (this is usually relatively small, kilobytes perhaps, but varies based on use case). It is possible to keep audit trail data with a deleted document (ie. application-specific things like "deleted_by" and "deleted_at"). While generally this is not an issue, if the DB is still larger than expected, even after considering the minimum size of a deleted document, check to insure that the deleted document doesn't contain data not unintended for keeping past the deletion action. Specifically, if your client library is not careful, it could be storing a full copy of each document in the deleted revisions. For more information: https://issues.apache.org/jira/browse/COUCHDB-1141 

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: