You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ji...@apache.org on 2025/05/29 20:10:26 UTC
(couchdb) branch ken-handle-nodedown created (now eb7ff24e1)
This is an automated email from the ASF dual-hosted git repository.
jiahuili430 pushed a change to branch ken-handle-nodedown
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at eb7ff24e1 Handle `bad_generator` error in ken_server
This branch includes the following new commits:
new eb7ff24e1 Handle `bad_generator` error in ken_server
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(couchdb) 01/01: Handle `bad_generator` error in ken_server
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiahuili430 pushed a commit to branch ken-handle-nodedown
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit eb7ff24e1044d147b797e9dc890c41ee9d252394
Author: Jiahui Li <li...@gmail.com>
AuthorDate: Thu May 29 15:07:27 2025 -0500
Handle `bad_generator` error in ken_server
Error log:
```
exit value:#012{
{bad_generator, {nodedown,<<"progress not possible">>}},
[
{ken_server,'-update_db_indexes/2-lc$^0/1-0-',1,[{file,"src/ken_server.erl"},{line,272}]},
{ken_server,update_db_indexes,2,[{file,"src/ken_server.erl"},{line,272}]}
]
}#012
```
---
src/ken/src/ken_server.erl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/ken/src/ken_server.erl b/src/ken/src/ken_server.erl
index 72c0db8ef..e5e111c91 100644
--- a/src/ken/src/ken_server.erl
+++ b/src/ken/src/ken_server.erl
@@ -268,7 +268,12 @@ get_active_count() ->
% If any indexing job fails, resubmit requests for all indexes.
update_db_indexes(Name, State) ->
case design_docs(Name) of
- {ok, DDocs} ->
+ {ok, DDocs0} ->
+ DDocs =
+ case is_list(DDocs0) of
+ true -> DDocs0;
+ false -> exit(resubmit)
+ end,
RandomSorted = lists:sort([{rand:uniform(), D} || D <- DDocs]),
Resubmit = lists:foldl(
fun({_, DDoc}, Acc) ->