You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ei...@apache.org on 2019/11/22 01:58:01 UTC

[couchdb] 12/14: Debug messages on index reset

This is an automated email from the ASF dual-hosted git repository.

eiri pushed a commit to branch 2167-no-view-changes
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 56e7f0cefea443aaeb383d41049ffb63c0261bc6
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Mon Nov 18 16:34:55 2019 -0400

    Debug messages on index reset
---
 src/couch_mrview/src/couch_mrview_util.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/couch_mrview/src/couch_mrview_util.erl b/src/couch_mrview/src/couch_mrview_util.erl
index d6999be..77ef6f1 100644
--- a/src/couch_mrview/src/couch_mrview_util.erl
+++ b/src/couch_mrview/src/couch_mrview_util.erl
@@ -778,7 +778,7 @@ delete_file(FName) ->
 
 
 reset_index(Db, Fd, #mrst{sig=Sig}=State) ->
-    ?l("!!! RESET INDEX ~p", [Sig]),
+    couch_log:error("[*] reset index ~s", [State#mrst.idx_name]),
     ok = couch_file:truncate(Fd, 0),
     ok = couch_file:write_header(Fd, {Sig, nil}),
     init_state(Db, Fd, reset_state(State), nil).
@@ -992,6 +992,7 @@ maybe_update_index_file(State) ->
 
 update_index_file(State) ->
     Sig = sig_vsn_12x(State),
+    couch_log:error("[*] migration attempt for ~s", [State#mrst.idx_name]),
     DbName = State#mrst.db_name,
     FileName = couch_index_util:hexsig(Sig) ++ ".view",
     IndexFile = couch_index_util:index_file("", DbName, FileName),
@@ -1009,7 +1010,8 @@ update_index_file(State) ->
         ok = file:rename(IndexFile, NewIndexFile),
         couch_log:info("Successfully updated legacy view index file.", []),
         Sig;
-    _ ->
+    E ->
+        couch_log:error("[*] can't open ~s : ~p", [FileName, E]),
         % Ignore missing index file
         ok
     end.