anchor.diff:  
       %% we still use ordinary views for development subset
       lists:foreach(
  -      fun (DbName) ->
  -              try
  -                  {ok, Db} = couch_db:open_int(DbName, []),
  -
  -                  try
  -                      couch_view:cleanup_index_files(Db)
  -                  after
  -                      couch_db:close(Db)
  -                  end
  -              catch
  -                  ViewT:ViewE ->
  -                      ?log_error(
  -                         "Error while doing cleanup of old "
  -                         "index files for database `~s`: ~p~n~p",
  -                         [DbName, {ViewT, ViewE}, erlang:get_stacktrace()])
  +      fun ({_, DbName} = VBucketAndDbName) ->
  +              case open_db(BucketName, VBucketAndDbName) of
  +                  {ok, Db} ->
  +                      try
  +                          couch_view:cleanup_index_files(Db)
  +                      catch
  +                          ViewE:ViewT ->
  +                              ?log_error(
  +                                 "Error while doing cleanup of old "
  +                                 "index files for database `~s`: ~p~n~p",
  +                                 [DbName, {ViewT, ViewE}, erlang:get_stacktrace()])
  +                      after
  +                          couch_db:close(Db)
  +                      end;
  +                  vbucket_moved ->
  +                      ok;
  +                  Error ->
  +                      ?log_error("Failed to open database `~s`: ~p",
  +                                 [DbName, Error])
                 end
         end, AllBucketDbs).
   
  
positive.code: 
                Compactors =
                    [ [{type, vbucket},
                       {name, VBucketDb},
                       {important, false},
                       {fa, {fun spawn_vbucket_compactor/1, [VBucketDb]}},
                       {on_success,
                        {fun update_bucket_compaction_progress/2, [Ix, Total]}}] ||
                        {Ix, VBucketDb} <- misc:enumerate(VBucketDbs) ],
  
                process_flag(trap_exit, true),
                do_chain_compactors(Parent, Compactors),
  
negative.code: all_bucket_dbs(BucketName) ->
      BucketConfig = get_bucket(BucketName),
      NodeVBuckets = ns_bucket:all_node_vbuckets(BucketConfig),
      VBucketDbs = [{V, db_name(BucketName, V)} || V <- NodeVBuckets],
  
      [{master, db_name(BucketName, "master")} | VBucketDbs].
  
  get_bucket(BucketName) ->
      get_bucket(BucketName, ns_config:get()).
  