Reputation: 573
We moved the .couch file from one drive to another because the original drive had reached 100% space. Then we remounted the new drive to older/original directory. In other words nothing changed.
Now I am able to see the documents but not able to run the views.
It just hangs.
Any idea what the problem might be?
Upvotes: 0
Views: 863
Reputation: 1542
Typically shuffling files around without restarting CouchDB itself is like moving the chair under your Grandma while she's sitting on it. Sooner or later, she's going to notice.... I guess you have relocated a subsection of the couchdb folder, and not enough for the views to work correctly.
If you GET $COUCH/$DB/_design/$DDOC/_info
you'll see a "signature": "e5c78acfda577dfba5abb602c432ead2"
field, where the hex string is related to the name of the underlying view file for that ddoc.
If you GET $COUCH/_config
using admin credentials, you can see the path to the view & index dirs. You should ensure that these haven't been screwed up during your remounts.
In my case it looks like this:
"database_dir": "/usr/local/var/lib/couchdb",
"index_dir": "/usr/local/var/lib/couchdb",
and in index_dir
I can see /usr/local/var/lib/couchdb/.testy_design/mrview/e5c78acfda577dfba5abb602c432ead2.view
. This is on master 1.3.0-a so the location is different for 1.2.0 and below. Anyway the database_dir and index_dir parameters in config need to match what's on disk. Check that.
You should remount the whole /usr/local/var/lib/couchdb
files (including views if you don't want to rebuild them) not some subcomponents of that.
Alternatively it might simply be a caching issue and after restarting CouchDB things will settle down. Typically Couch relies on caching stuff and is not expecting to have the chair moved :-).
Upvotes: 1