anchor.diff:  
       {DataSize, FileSize} =
           lists:foldl(
  -          fun (DbName, {AccDataSize, AccFileSize}) ->
  +          fun ({_VBucket, DbName}, {AccDataSize, AccFileSize}) ->
                     {ok, Db} = couch_db:open_int(DbName, []),
   
                     %% unfortunately I can't just bind this inside try block
  
positive.code:               Result =/= ok
        end, lists:zip(Nodes, Results)).
  
  check_all_dbs_exist(BucketName, RequiredDbs) ->
      ExistingDbs = ns_storage_conf:bucket_databases(BucketName),
      SortedRequiredDbs = lists:usort(RequiredDbs),
  
  
negative.code: 
      %% we still use ordinary views for development subset
      lists:foreach(
        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).
  
  