Re: [PR] docs: Add Ubuntu 22.04 Jammy Jellyfish as supported OS [couchdb]
big-r81 merged PR #4805: URL: https://github.com/apache/couchdb/pull/4805 -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] mango: do not skip json tests when clouseau installed [couchdb]
pgj commented on PR #4806: URL: https://github.com/apache/couchdb/pull/4806#issuecomment-1764424454 I tested this with and without Clouseau and I can confirm the results. -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] mango: do not skip json tests when clouseau installed [couchdb]
willholley merged PR #4806: URL: https://github.com/apache/couchdb/pull/4806 -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] mango: do not skip json tests when clouseau installed [couchdb]
willholley opened a new pull request, #4806: URL: https://github.com/apache/couchdb/pull/4806 ## Overview Previously, Mango tests which only apply to JSON indexes were being skipped if the clouseau (text index) service was enabled for the CouchDB instance being tested against, resulting in tests being skipped in some CI cases. This refactors the tests so that we execute these tests on JSON / all_docs indexes regardless of whether clouseau is present or not. ## Testing recommendations `make mango-test` with / without clouseau enabled. ## Related Issues or Pull Requests ## Checklist - [ ] Code is written and works correctly - [ ] Changes are covered by tests - [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini` - [ ] Documentation changes were made in the `src/docs` folder - [ ] Documentation changes were backported (separated PR) to affected branches -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] mango: do not skip json tests when clouseau installed [couchdb]
pgj commented on code in PR #4806: URL: https://github.com/apache/couchdb/pull/4806#discussion_r1360624716 ## src/mango/test/03-operator-test.py: ## @@ -14,191 +14,180 @@ import unittest -class OperatorTests: -def assertUserIds(self, user_ids, docs): -user_ids_returned = list(d["user_id"] for d in docs) -user_ids.sort() -user_ids_returned.sort() -self.assertEqual(user_ids, user_ids_returned) - -def test_all(self): -docs = self.db.find( -{"manager": True, "favorites": {"$all": ["Lisp", "Python"]}} -) -self.assertEqual(len(docs), 3) -user_ids = [2, 12, 9] -self.assertUserIds(user_ids, docs) - -def test_all_non_array(self): -docs = self.db.find({"manager": True, "location": {"$all": ["Ohai"]}}) -self.assertEqual(len(docs), 0) - -def test_elem_match(self): -emdocs = [ -{"user_id": "a", "bang": [{"foo": 1, "bar": 2}]}, -{"user_id": "b", "bang": [{"foo": 2, "bam": True}]}, -] -self.db.save_docs(emdocs, w=3) -docs = self.db.find( -{ -"_id": {"$gt": None}, -"bang": {"$elemMatch": {"foo": {"$gte": 1}, "bam": True}}, -} -) -self.assertEqual(len(docs), 1) -self.assertEqual(docs[0]["user_id"], "b") - -def test_all_match(self): -amdocs = [ -{"user_id": "a", "bang": [{"foo": 1, "bar": 2}, {"foo": 3, "bar": 4}]}, -{"user_id": "b", "bang": [{"foo": 1, "bar": 2}, {"foo": 4, "bar": 4}]}, -] -self.db.save_docs(amdocs, w=3) -docs = self.db.find( -{"bang": {"$allMatch": {"foo": {"$mod": [2, 1]}, "bar": {"$mod": [2, 0] -) -self.assertEqual(len(docs), 1) -self.assertEqual(docs[0]["user_id"], "a") - -def test_empty_all_match(self): -amdocs = [{"bad_doc": "a", "emptybang": []}] -self.db.save_docs(amdocs, w=3) -docs = self.db.find({"emptybang": {"$allMatch": {"foo": {"$eq": 2) -self.assertEqual(len(docs), 0) - -@unittest.skipUnless( -not mango.has_text_service(), -"text indexes do not support the $keyMapMatch operator", -) -def test_keymap_match(self): -amdocs = [ -{"foo": {"aa": "bar", "bb": "bang"}}, -{"foo": {"cc": "bar", "bb": "bang"}}, -] -self.db.save_docs(amdocs, w=3) -docs = self.db.find({"foo": {"$keyMapMatch": {"$eq": "aa"}}}) -self.assertEqual(len(docs), 1) - -def test_in_operator_array(self): -docs = self.db.find({"manager": True, "favorites": {"$in": ["Ruby", "Python"]}}) -self.assertUserIds([2, 6, 7, 9, 11, 12], docs) - -def test_nin_operator_array(self): -docs = self.db.find( -{"manager": True, "favorites": {"$nin": ["Erlang", "Python"]}} -) -self.assertEqual(len(docs), 4) -for doc in docs: -if isinstance(doc["favorites"], list): -self.assertNotIn("Erlang", doc["favorites"]) -self.assertNotIn("Python", doc["favorites"]) - -def test_regex(self): -docs = self.db.find( -{"age": {"$gt": 40}, "location.state": {"$regex": "(?i)new.*"}} -) -self.assertEqual(len(docs), 2) -self.assertUserIds([2, 10], docs) - -def test_exists_false(self): -docs = self.db.find({"age": {"$gt": 0}, "twitter": {"$exists": False}}) -user_ids = [2, 3, 5, 6, 7, 8, 10, 11, 12, 14] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertNotIn("twitter", d) - -def test_eq_null_does_not_include_missing(self): -docs = self.db.find({"age": {"$gt": 0}, "twitter": None}) -user_ids = [9] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertEqual(d["twitter"], None) - -def test_ne_includes_null_but_not_missing(self): -docs = self.db.find({"twitter": {"$ne": "notamatch"}}) -user_ids = [0, 1, 4, 9, 13] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertIn("twitter", d) - -# ideally this work be consistent across index types but, alas, it is not -@unittest.skipUnless( -not mango.has_text_service(), -"text indexes do not support range queries across type boundaries", -) +class BaseOperatorTests: +class Common(object): Review Comment: Why do we need this `Common` subclass? -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[Jenkins] FAILURE: CouchDB » Full Platform Builds » main #889
Boo, we failed. https://ci-couchdb.apache.org/job/jenkins-cm1/job/FullPlatformMatrix/job/main/889/display/redirect
Re: [PR] mango: do not skip json tests when clouseau installed [couchdb]
willholley commented on code in PR #4806: URL: https://github.com/apache/couchdb/pull/4806#discussion_r1360643996 ## src/mango/test/03-operator-test.py: ## @@ -14,191 +14,180 @@ import unittest -class OperatorTests: -def assertUserIds(self, user_ids, docs): -user_ids_returned = list(d["user_id"] for d in docs) -user_ids.sort() -user_ids_returned.sort() -self.assertEqual(user_ids, user_ids_returned) - -def test_all(self): -docs = self.db.find( -{"manager": True, "favorites": {"$all": ["Lisp", "Python"]}} -) -self.assertEqual(len(docs), 3) -user_ids = [2, 12, 9] -self.assertUserIds(user_ids, docs) - -def test_all_non_array(self): -docs = self.db.find({"manager": True, "location": {"$all": ["Ohai"]}}) -self.assertEqual(len(docs), 0) - -def test_elem_match(self): -emdocs = [ -{"user_id": "a", "bang": [{"foo": 1, "bar": 2}]}, -{"user_id": "b", "bang": [{"foo": 2, "bam": True}]}, -] -self.db.save_docs(emdocs, w=3) -docs = self.db.find( -{ -"_id": {"$gt": None}, -"bang": {"$elemMatch": {"foo": {"$gte": 1}, "bam": True}}, -} -) -self.assertEqual(len(docs), 1) -self.assertEqual(docs[0]["user_id"], "b") - -def test_all_match(self): -amdocs = [ -{"user_id": "a", "bang": [{"foo": 1, "bar": 2}, {"foo": 3, "bar": 4}]}, -{"user_id": "b", "bang": [{"foo": 1, "bar": 2}, {"foo": 4, "bar": 4}]}, -] -self.db.save_docs(amdocs, w=3) -docs = self.db.find( -{"bang": {"$allMatch": {"foo": {"$mod": [2, 1]}, "bar": {"$mod": [2, 0] -) -self.assertEqual(len(docs), 1) -self.assertEqual(docs[0]["user_id"], "a") - -def test_empty_all_match(self): -amdocs = [{"bad_doc": "a", "emptybang": []}] -self.db.save_docs(amdocs, w=3) -docs = self.db.find({"emptybang": {"$allMatch": {"foo": {"$eq": 2) -self.assertEqual(len(docs), 0) - -@unittest.skipUnless( -not mango.has_text_service(), -"text indexes do not support the $keyMapMatch operator", -) -def test_keymap_match(self): -amdocs = [ -{"foo": {"aa": "bar", "bb": "bang"}}, -{"foo": {"cc": "bar", "bb": "bang"}}, -] -self.db.save_docs(amdocs, w=3) -docs = self.db.find({"foo": {"$keyMapMatch": {"$eq": "aa"}}}) -self.assertEqual(len(docs), 1) - -def test_in_operator_array(self): -docs = self.db.find({"manager": True, "favorites": {"$in": ["Ruby", "Python"]}}) -self.assertUserIds([2, 6, 7, 9, 11, 12], docs) - -def test_nin_operator_array(self): -docs = self.db.find( -{"manager": True, "favorites": {"$nin": ["Erlang", "Python"]}} -) -self.assertEqual(len(docs), 4) -for doc in docs: -if isinstance(doc["favorites"], list): -self.assertNotIn("Erlang", doc["favorites"]) -self.assertNotIn("Python", doc["favorites"]) - -def test_regex(self): -docs = self.db.find( -{"age": {"$gt": 40}, "location.state": {"$regex": "(?i)new.*"}} -) -self.assertEqual(len(docs), 2) -self.assertUserIds([2, 10], docs) - -def test_exists_false(self): -docs = self.db.find({"age": {"$gt": 0}, "twitter": {"$exists": False}}) -user_ids = [2, 3, 5, 6, 7, 8, 10, 11, 12, 14] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertNotIn("twitter", d) - -def test_eq_null_does_not_include_missing(self): -docs = self.db.find({"age": {"$gt": 0}, "twitter": None}) -user_ids = [9] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertEqual(d["twitter"], None) - -def test_ne_includes_null_but_not_missing(self): -docs = self.db.find({"twitter": {"$ne": "notamatch"}}) -user_ids = [0, 1, 4, 9, 13] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertIn("twitter", d) - -# ideally this work be consistent across index types but, alas, it is not -@unittest.skipUnless( -not mango.has_text_service(), -"text indexes do not support range queries across type boundaries", -) +class BaseOperatorTests: +class Common(object): Review Comment: This was just to clarify the scope of the common tests - that they should only be used as a mixin to the JSON/text/AllDocs test classes rather than being a standalone test suite. -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please
[Jenkins] FAILURE: CouchDB » Full Platform Builds » main #890
Boo, we failed. https://ci-couchdb.apache.org/job/jenkins-cm1/job/FullPlatformMatrix/job/main/890/display/redirect
Re: [PR] mango: do not skip json tests when clouseau installed [couchdb]
pgj commented on code in PR #4806: URL: https://github.com/apache/couchdb/pull/4806#discussion_r1360653227 ## src/mango/test/03-operator-test.py: ## @@ -14,191 +14,180 @@ import unittest -class OperatorTests: -def assertUserIds(self, user_ids, docs): -user_ids_returned = list(d["user_id"] for d in docs) -user_ids.sort() -user_ids_returned.sort() -self.assertEqual(user_ids, user_ids_returned) - -def test_all(self): -docs = self.db.find( -{"manager": True, "favorites": {"$all": ["Lisp", "Python"]}} -) -self.assertEqual(len(docs), 3) -user_ids = [2, 12, 9] -self.assertUserIds(user_ids, docs) - -def test_all_non_array(self): -docs = self.db.find({"manager": True, "location": {"$all": ["Ohai"]}}) -self.assertEqual(len(docs), 0) - -def test_elem_match(self): -emdocs = [ -{"user_id": "a", "bang": [{"foo": 1, "bar": 2}]}, -{"user_id": "b", "bang": [{"foo": 2, "bam": True}]}, -] -self.db.save_docs(emdocs, w=3) -docs = self.db.find( -{ -"_id": {"$gt": None}, -"bang": {"$elemMatch": {"foo": {"$gte": 1}, "bam": True}}, -} -) -self.assertEqual(len(docs), 1) -self.assertEqual(docs[0]["user_id"], "b") - -def test_all_match(self): -amdocs = [ -{"user_id": "a", "bang": [{"foo": 1, "bar": 2}, {"foo": 3, "bar": 4}]}, -{"user_id": "b", "bang": [{"foo": 1, "bar": 2}, {"foo": 4, "bar": 4}]}, -] -self.db.save_docs(amdocs, w=3) -docs = self.db.find( -{"bang": {"$allMatch": {"foo": {"$mod": [2, 1]}, "bar": {"$mod": [2, 0] -) -self.assertEqual(len(docs), 1) -self.assertEqual(docs[0]["user_id"], "a") - -def test_empty_all_match(self): -amdocs = [{"bad_doc": "a", "emptybang": []}] -self.db.save_docs(amdocs, w=3) -docs = self.db.find({"emptybang": {"$allMatch": {"foo": {"$eq": 2) -self.assertEqual(len(docs), 0) - -@unittest.skipUnless( -not mango.has_text_service(), -"text indexes do not support the $keyMapMatch operator", -) -def test_keymap_match(self): -amdocs = [ -{"foo": {"aa": "bar", "bb": "bang"}}, -{"foo": {"cc": "bar", "bb": "bang"}}, -] -self.db.save_docs(amdocs, w=3) -docs = self.db.find({"foo": {"$keyMapMatch": {"$eq": "aa"}}}) -self.assertEqual(len(docs), 1) - -def test_in_operator_array(self): -docs = self.db.find({"manager": True, "favorites": {"$in": ["Ruby", "Python"]}}) -self.assertUserIds([2, 6, 7, 9, 11, 12], docs) - -def test_nin_operator_array(self): -docs = self.db.find( -{"manager": True, "favorites": {"$nin": ["Erlang", "Python"]}} -) -self.assertEqual(len(docs), 4) -for doc in docs: -if isinstance(doc["favorites"], list): -self.assertNotIn("Erlang", doc["favorites"]) -self.assertNotIn("Python", doc["favorites"]) - -def test_regex(self): -docs = self.db.find( -{"age": {"$gt": 40}, "location.state": {"$regex": "(?i)new.*"}} -) -self.assertEqual(len(docs), 2) -self.assertUserIds([2, 10], docs) - -def test_exists_false(self): -docs = self.db.find({"age": {"$gt": 0}, "twitter": {"$exists": False}}) -user_ids = [2, 3, 5, 6, 7, 8, 10, 11, 12, 14] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertNotIn("twitter", d) - -def test_eq_null_does_not_include_missing(self): -docs = self.db.find({"age": {"$gt": 0}, "twitter": None}) -user_ids = [9] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertEqual(d["twitter"], None) - -def test_ne_includes_null_but_not_missing(self): -docs = self.db.find({"twitter": {"$ne": "notamatch"}}) -user_ids = [0, 1, 4, 9, 13] -self.assertUserIds(user_ids, docs) -for d in docs: -self.assertIn("twitter", d) - -# ideally this work be consistent across index types but, alas, it is not -@unittest.skipUnless( -not mango.has_text_service(), -"text indexes do not support range queries across type boundaries", -) +class BaseOperatorTests: +class Common(object): Review Comment: Okay, thanks for the clarification. -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fix a few couch_os_process metrics [couchdb]
nickva merged PR #4807: URL: https://github.com/apache/couchdb/pull/4807 -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Fix flaky couch_stream test [couchdb]
nickva opened a new pull request, #4808: URL: https://github.com/apache/couchdb/pull/4808 On MacOS runner this test can be flaky. On slower workers StreamPid would usually be killed by the time we check is_process_alive/1, however on MacOS it has failed at least once with: ``` module 'couch_stream_tests' CouchDB stream tests couch_stream_tests:124: -should_stop_on_normal_exit_of_stream_opener/1-fun-3-...*failed* in function couch_stream_tests:'-should_stop_on_normal_exit_of_stream_opener/1-fun-3-'/1 (test/eunit/couch_stream_tests.erl, line 124) in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) [...] **error:{assert,[{module,couch_stream_tests}, {line,124}, {expression,"not ( is_process_alive ( StreamPid ) )"}, {expected,true}, {value,false}]} ``` To fix it, ensure we wait for the process to die before asserting it's dead. It's a bit redundant to assert it's gone, but we leave that in the test mostly to make it obvious what we're after. If the process refuses to die the test will most likely fail a timeout. While we're at it, modernize the test suite to use the standard `?TDEF_FE` macros. In some cases we were running the test code in the setup phase instead of the test itself (`_assert...` vs `assert...` calls), so this should fix that as well. -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Fix a few couch_os_process metrics [couchdb]
nickva opened a new pull request, #4807: URL: https://github.com/apache/couchdb/pull/4807 Some were misnamed: * exists -> exits * process_prompt_errors is just errors * description of process_errors was incorrect Some were missing: * process_error_exits was not defined in the cfg file -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[Jenkins] SUCCESS: CouchDB » Full Platform Builds » main #891
Yay, we passed. https://ci-couchdb.apache.org/job/jenkins-cm1/job/FullPlatformMatrix/job/main/891/display/redirect
Re: [PR] Allow configuration of Pod Labels [couchdb-helm]
clayvan commented on PR #131: URL: https://github.com/apache/couchdb-helm/pull/131#issuecomment-1764951108 @willholley Not sure who typically reviews community PRs, but hoping to get this simple one reviewed. -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[Jenkins] FAILURE: CouchDB » Full Platform Builds » main #892
Boo, we failed. https://ci-couchdb.apache.org/job/jenkins-cm1/job/FullPlatformMatrix/job/main/892/display/redirect
[PR] Allow configuration of Pod Labels [couchdb-helm]
clayvan opened a new pull request, #131: URL: https://github.com/apache/couchdb-helm/pull/131 What this PR does / why we need it: This PR allows the configuration of additional Pod Labels. There are several use cases for this, one of which is injecting Istio sidecars which can only be done via Pod Labels. Special notes for your reviewer: Checklist [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields. - [x] Chart Version bumped - [ ] e2e tests pass - [ ] Variables are documented in the README.md -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[Jenkins] SUCCESS: CouchDB » Full Platform Builds » main #893
Yay, we passed. https://ci-couchdb.apache.org/job/jenkins-cm1/job/FullPlatformMatrix/job/main/893/display/redirect
[Jenkins] SUCCESS: CouchDB » Full Platform Builds » main #895
Yay, we passed. https://ci-couchdb.apache.org/job/jenkins-cm1/job/FullPlatformMatrix/job/main/895/display/redirect
[Jenkins] FAILURE: CouchDB » Full Platform Builds » main #894
Boo, we failed. https://ci-couchdb.apache.org/job/jenkins-cm1/job/FullPlatformMatrix/job/main/894/display/redirect
[I] get_index call crashes couch_index_server instance [couchdb]
nickva opened a new issue, #4809: URL: https://github.com/apache/couchdb/issues/4809 This failure was noticed on MacOS CI worker: ``` couch_index_crash_tests:76: index_crash_test_ (t_index_process_dies)...*failed* in function gen_server:call/3 (gen_server.erl, line 247) in call from couch_util:with_db/2 (src/couch_util.erl, line 575) in call from couch_index_crash_tests:t_index_process_dies/1 (test/eunit/couch_index_crash_tests.erl, line 169) in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) in call from couch_index_server:get_index/3 called as get_index(test_index,{db,1,<<"shards/-/eunit-test-db-df9ba"...>>, "/Users/nvatama/asf/tmp/data/shards/-/eunit-test-db-df9ba5011aeb1414c66776d780ab2d3b.1697513861.couch", {couch_bt_engine,{st,"/Users/nvatama/asf/tmp/data/shards/-/eunit-test-db-df9ba5011aeb1414c66776d780ab2d3b.1697513861.couch", <0.914.0>,#Ref<0.3262295735.3275227137.251265>, undefined, {db_header,...}, false,...}}, <0.913.0>,nil,1,<<"1697513861067778">>, {user_ctx,null,[],undefined}, [],[],nil,nil,...},{doc,<<"idx_name">>, {1,[<<23,144,119,134,205,40,77,101,...>>]}, {[{<<"value">>,1}]}, [],false,[]}) **exit:{boom, {gen_server,call, [index_server_9, {get_index, {test_index, {<<"shards/-/eun"...>>, {doc,<<"idx_name">>,{1,[<<...>>]},{[{...}]},[],false,...}}, <<"shards/-/eun"...>>, <<210,59,167,223,130,127,...>>}}, infinity]}} output:<<"">> ``` The test code in question is: ```erlang exit(IdxPid, boom), meck:wait(couch_index_server, handle_info, [{'EXIT', IdxPid, boom}, '_'], 1000), {ok, IdxPid2} = get_index(DbShard, DDoc), ``` We kill an index process expecting a new one to start. However when calling `get_index/3` `index_server_9` itself crashes. That seem to point to a race condition in the index server logic. -- 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: notifications-unsubscr...@couchdb.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fix flaky couch_stream test [couchdb]
nickva merged PR #4808: URL: https://github.com/apache/couchdb/pull/4808 -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] get_index call crashes couch_index_server instance [couchdb]
nickva commented on issue #4809: URL: https://github.com/apache/couchdb/issues/4809#issuecomment-1765685906 This seems to reproduce it: ``` diff --git a/src/couch_index/src/couch_index_server.erl b/src/couch_index/src/couch_index_server.erl index 35df43d2a..a40ea0e2a 100644 --- a/src/couch_index/src/couch_index_server.erl +++ b/src/couch_index/src/couch_index_server.erl @@ -171,6 +171,7 @@ handle_call({async_open, {DbName, DDocId, Sig}, {ok, Pid}}, {OpenerPid, _}, Stat [{_, Waiters}] = ets:lookup(State#st.by_sig, {DbName, Sig}), [gen_server:reply(From, {ok, Pid}) || From <- Waiters], link(Pid), +timer:sleep(100), ets:delete(State#st.openers, OpenerPid), add_to_ets(DbName, Sig, DDocId, Pid, State), {reply, ok, State}; ``` Async open returns too early an index process to the caller. In the index server we have an opener still in openers and haven't added the new process to the other ets tables. At this point the caller gets the index Pid and kills it. This kills both index and the still linked opener. Client calls `get_index(...)` again, while that call is in the queue, the index server continues the `async_open` handler and deletes the `ets:delete(State#st.openers, OpenerPid)`. Then starts handling `EXIT` messages. First is the indexer `EXIT` message. This is handled in: ```erlang case ets:lookup(Server#st.by_pid, Pid) of [{Pid, {DbName, Sig}}] -> ... ``` However when the opener `EXIT` is handled, we don't find the `Pid` in the `by_pid` or the openers table and we crash the gen_server. ```erlang case ets:lookup(Server#st.openers, Pid) of ... -> ...; [] -> exit(Reason) ``` -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] get_index call crashes couch_index_server instance [couchdb]
nickva commented on issue #4809: URL: https://github.com/apache/couchdb/issues/4809#issuecomment-1765686676 The solution seems to be not return too early from async_open, at least not until we updated ets tables. -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] docs: Add Ubuntu 22.04 Jammy Jellyfish as supported OS [couchdb]
sblaisot opened a new pull request, #4805: URL: https://github.com/apache/couchdb/pull/4805 ## Overview Add Ubuntu 22.04 Jammy Jellyfish as supported OS in documentation. Deb packages for couchdb are available for that distribution. -- 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: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org