noahshaw11 commented on pull request #3964:
URL: https://github.com/apache/couchdb/pull/3964#issuecomment-1074725480
Listed below are the errors found via adding the following spec:
```
diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index 3c72e3357..72bd51375 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -90,6 +90,9 @@ get_spidermonkey_version() ->
list_to_binary(?COUCHDB_SPIDERMONKEY_VERSION).
sup_start_link(N) ->
gen_server:start_link({local, couch_server(N)}, couch_server, [N], []).
+-spec open(any(), [any()]) ->
+ {ok, any()} |
+ {error, all_dbs_active}.
open(DbName, Options) ->
try
validate_open_or_create(DbName, Options),
```
List of errors:
```
src/couch_db_split.erl:0: in couch_db_split:split/3[57-77]:The pattern
{'not_found', _} can never match the type
{'error', 'all_dbs_active'}
src/couch_db_split.erl:0: in couch_db_split:copy_local_docs/3[78-111]:The
pattern
{'not_found', _} can never match the type
{'error', 'all_dbs_active'}
src/couch_db_split.erl:0: in couch_db_split:cleanup_target/2[112-126]:The
pattern
{'not_found', _} can never match the type
{'error', 'all_dbs_active'}
src/cpse_test_open_close_delete.erl:0: in
cpse_test_open_close_delete:cpse_open_non_existent/1[32-38]:Guard test
{'error', 'all_dbs_active'} | {'ok', _} =:=
__X :: {'not_found', 'no_db_file'} can never succeed
src/cpse_test_open_close_delete.erl:0: in
cpse_test_open_close_delete:cpse_open_create/1[39-45]:Guard test
{'error', 'all_dbs_active'} | {'ok', _} =:=
__X :: {'not_found', 'no_db_file'} can never succeed
src/cpse_test_open_close_delete.erl:0: in
cpse_test_open_close_delete:cpse_open_when_exists/1[46-52]:Guard test
{'error', 'all_dbs_active'} | {'ok', _} =:=
__X :: {'not_found', 'no_db_file'} can never succeed
src/cpse_test_open_close_delete.erl:0: in
cpse_test_open_close_delete:cpse_terminate/1[53-59]:Guard test
{'error', 'all_dbs_active'} | {'ok', _} =:=
__X :: {'not_found', 'no_db_file'} can never succeed
src/dreyfus_rpc.erl:0: in dreyfus_rpc:get_or_create_db/2[104-113]:The
pattern
{'not_found', 'no_db_file'} can never match the type
{'error', 'all_dbs_active'} | {'ok', _}
src/mem3_rep.erl:0: in mem3_rep:go/1[106-132]:The pattern
{'not_found', 'no_db_file'} can never match the type
{'error', 'all_dbs_active'}
src/mem3_rep.erl:0: in mem3_rep:with_src_db/2[711-723]:The pattern
{'not_found', _} can never match the type
{'error', 'all_dbs_active'}
src/mem3_reshard_job.erl:0: in
mem3_reshard_job:wait_source_close_impl/1[499-516]:The pattern
{'not_found', _} can never match the type
{'error', 'all_dbs_active'}
src/mem3_util.erl:0: in mem3_util:ensure_exists/1[294-305]:The pattern
'file_exists' can never match the type
{'error', 'all_dbs_active'}
src/mem3_util.erl:0: in mem3_util:get_or_create_db/2[548-564]:The pattern
{'not_found', 'no_db_file'} can never match the type
{'error', 'all_dbs_active'}
src/mem3_util.erl:0: in mem3_util:get_or_create_db_int/2[565-582]:The
pattern
{'not_found', 'no_db_file'} can never match the type
{'error', 'all_dbs_active'}
src/mem3_util.erl:0: in mem3_util:get_shard_props/1[589-610]:The pattern
{'not_found', _} can never match the type
{'error', 'all_dbs_active'}
src/hastings_rpc.erl:0: in hastings_rpc:get_or_create_db/2[111-120]:The
pattern
{'not_found', 'no_db_file'} can never match the type
{'error', 'all_dbs_active'} | {'ok', _}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]