[MB-6382] Bucket deletion fails to delete on-disk data and indexes Created: 22/Aug/12  Updated: 09/Jan/13  Resolved: 05/Oct/12

Status: Closed
Project: Couchbase Server
Component/s: ns_server
Affects Version/s: 2.0-beta
Fix Version/s: 2.0
Security Level: Public

Type: Bug Priority: Major
Reporter: Karan Kumar (Inactive) Assignee: Aleksey Kondratenko
Resolution: Cannot Reproduce Votes: 0
Labels: 2.0-beta-release-notes, system-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Centos 64 bit
1613


 Description   
Deleted default-p and default-s buckets, while the indexing/compaction was still in progress

Post deletion of these buckets, we stil have dangling databases (eg from node 17 and node 20)
On node 20 (default bucket is not deleted), on node 17 (default-s bucket is not deleted)
the indexes for these databases still exists on disk.

node 20
ls -latr /data/
total 76
drwxr-xr-x. 3 couchbase couchbase 4096 Aug 19 17:43 .bucket-0
-rw-r--r--. 1 couchbase couchbase 4175 Aug 20 16:56 _users.couch.1
-rw-r--r--. 1 couchbase couchbase 4175 Aug 20 16:56 _replicator.couch.1
drwxr-xr-x. 3 couchbase couchbase 4096 Aug 20 17:38 .default
dr-xr-xr-x. 26 root root 4096 Aug 20 19:22 ..
drwxr-xr-x. 2 couchbase couchbase 4096 Aug 21 15:03 .default-p
drwxr-xr-x. 3 couchbase couchbase 4096 Aug 22 13:05 @indexes
drwxr-xr-x. 2 couchbase couchbase 4096 Aug 22 13:05 .default-s
drwxr-xr-x. 2 couchbase couchbase 4096 Aug 22 13:09 ._replicator_design
drwxr-xr-x. 11 couchbase couchbase 4096 Aug 22 13:09 .
drwxr-xr-x. 2 couchbase couchbase 12288 Aug 22 13:11 default
drwxr-xr-x. 2 couchbase couchbase 4096 Aug 22 13:28 go
drwxr-xr-x. 70 couchbase couchbase 4096 Aug 22 13:28 .delete

node 17
Dont see message like following for the default-s bucket here
[ns_server:info,2012-08-22T13:12:25.807,ns_1@10.3.121.17:'ns_memcached-default':ns_storage_conf:delete_couch_database:410]Deleting database <<"default/master">>: ok
[ns_server:info,2012-08-22T13:12:25.808,ns_1@10.3.121.17:'ns_memcached-default':ns_storage_conf:delete_databases_and_files:462]Couch dbs are deleted. Proceeding with bucket directory

node 20
Dont see message like following for the default bucket here
[ns_server:info,2012-08-22T13:05:51.167,ns_1@10.3.121.20:'ns_memcached-default-s':ns_storage_conf:delete_databases_and_files:462]Couch dbs are deleted. Proceeding with bucket directory

 Comments   
Comment by Karan Kumar (Inactive) [ 22/Aug/12 ]
https://s3.amazonaws.com/bugdb/jira/deletion_bug/deletion_node17.zip

https://s3.amazonaws.com/bugdb/jira/deletion_bug/deletion_node20.zip
Comment by Karan Kumar (Inactive) [ 22/Aug/12 ]
Dont see this either in the logs

Error ->
            ale:error(?USER_LOGGER, "Unable to delete some DBs for bucket ~s. Leaving bucket directory undeleted~n~p", [Bucket, Error]),
            Error
Comment by Karan Kumar (Inactive) [ 22/Aug/12 ]
To update, on all the nodes, out of 2 buckets, we have node deleting only 1 bucket.
Comment by Aleksey Kondratenko [ 05/Oct/12 ]
Looks like this happened because of timeout listing vbuckets to delete, but we don't do it via couch_server calls anymore. Thus fixed by unrelated commit.
Generated at Sat Aug 30 11:40:31 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.