anchor.diff:             {compaction_hist, StorageStats#storage_stats.compaction_hist}
             ]),
       catch leo_object_storage_haystack:close(WriteHandler, ReadHandler),
  -    catch leo_backend_db_server:close(MetaDBId),
  +    case Reason of
  +        normal_shutdown ->
  +            % call leo_backend_db_server:close only when leo_storage stop
  +            catch leo_backend_db_server:close(MetaDBId);
  +        _ ->
  +            nop
  +    end,
       ok;
  -close_storage(_,_,_,_,_,_) ->
  +close_storage(_,_,_,_,_,_,_) ->
       ok.
  
positive.code:                           [{module, ?MODULE_STRING}, {function, "terminate/2"},
                             {line, ?LINE}, {body, Id}]),
      ok = close_storage(Id, MetaDBId, StateFilePath,
                         StorageStats, WriteHandler, ReadHandler),
      ok.
  
  %% @doc Convert process state when code is changed
  
negative.code: %% @doc Close a storage
  %% @private
  close_storage(Id, MetaDBId, StateFilePath,
                StorageStats, WriteHandler, ReadHandler, Reason) when is_list(StateFilePath) ->
      _ = filelib:ensure_dir(StateFilePath),
      _ = leo_file:file_unconsult(
            StateFilePath,
  