[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082853325 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. Review Comment: We've been informally tagging those with "backwards compatibility" or "upgrade clause" notes in the comments. Searching for "TODO" would work as well. Some official marker would be better, of course. Another way is to add a config parameter like we had for rexi use_kill_all but there is a balance there. But I am inclined to merge it as is and do the extra formalizing as another task -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082853325 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. Review Comment: We've been informally tagging those with "backwards compatibility" or "upgrade clause" notes in the comments. Searching for "TODO" would work as well. Some official marker would be better, of course. Another way is to add a config parameter like we had for rexi use_kill_all but there is a balance there. -- 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
[GitHub] [couchdb] janl opened a new issue, #4396: Add comments to mixed-cluster upgrade code
janl opened a new issue, #4396: URL: https://github.com/apache/couchdb/issues/4396 Via https://github.com/apache/couchdb/pull/4394#pullrequestreview-1263473784 It’d be nice if we tagged code that can be removed after we can expect everybody to have gone through a rolling cluster upgrade with the version number at which it can be removed, so we can semi-automate cleaning up said code. We could decide to make it a promise that if someone wants to do a rolling upgrade from N-1 to N, that if they are on the latest N-1 release that they can upgrade safely and that N no longer has the upgrade code. But all versions inside N-1 can be rolling-upgraded. That would reflect reality, especially outside IBM/Cloudant, where folks don’t track each and every CouchDB version. cc @mikerhodes -- 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
[GitHub] [couchdb] janl closed issue #4391: Get reduce count for mango query
janl closed issue #4391: Get reduce count for mango query URL: https://github.com/apache/couchdb/issues/4391 -- 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
[GitHub] [couchdb] janl commented on issue #4391: Get reduce count for mango query
janl commented on issue #4391: URL: https://github.com/apache/couchdb/issues/4391#issuecomment-1398677113 this feature does not exist at the moment but would be a great addition. Closing in favour of the earlier https://github.com/apache/couchdb/issues/1254 -- 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
[GitHub] [couchdb] janl merged pull request #4394: Mango fields pushdown
janl merged PR #4394: URL: https://github.com/apache/couchdb/pull/4394 -- 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
[GitHub] [couchdb] chiraganand commented on issue #4373: POST _revs_diff request stuck without timing out
chiraganand commented on issue #4373: URL: https://github.com/apache/couchdb/issues/4373#issuecomment-1398666738 > Could try also tweaking the number of replication workers, maybe try 1 instead of 4 > > https://docs.couchdb.org/en/stable/config/replicator.html > > ``` > [replicator] > worker_processes = 1 > ``` > > Or try increasing or decreasing the number of connections: > > ``` > [replicator] > http_connections = 40 > ``` Can't try these right now because I am unable to reproduce the original issue. -- 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
[GitHub] [couchdb] chiraganand commented on issue #4373: POST _revs_diff request stuck without timing out
chiraganand commented on issue #4373: URL: https://github.com/apache/couchdb/issues/4373#issuecomment-1398665264 I tried v3.3.1 and was able to reproduce the error exactly after 800 requests on an EC2 _m4.large VM_. Some more observations: 1. If I reduced the number of concurrent threads to 5 from 10 then no request would timeout among a total of 1000 requests. 2. I would not see this same behaviour on a bigger machine (_m4.xlarge_). All the 1000 requests would respond before timing out on the bigger machine with 10 concurrent threads. 3. Surprisingly, I encountered the original issue while there was only one active user not 10 concurrent users. I used JMeter to pin down the problem. > If there are proxies in between they could also be blocking or timing out the connections. It might help inspecting logs there for connection states. On _m4.large_ VM there are no proxies but on _m4.xlarge_ there is a Nginx reverse proxy. Because of an internal requirement we had to wipe off the core databases on both the servers and I am now unable to reproduce this issue. There is not even a single error in 100 iterations with 50 concurrent threads! I guess I will populate more data and then test again. -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082822189 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. Review Comment: Okay. Sounds good. -- 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
[GitHub] [couchdb] janl commented on pull request #4395: ci(freebsd): re-enable full platform ci on FreeBSD
janl commented on PR #4395: URL: https://github.com/apache/couchdb/pull/4395#issuecomment-1398652971 Clean bill of health & nice and fast https://user-images.githubusercontent.com/11321/213755187-48c2ef9c-4198-4c68-9524-924aee0847f4.png;> https://user-images.githubusercontent.com/11321/213755199-eb574f20-634a-429c-8951-7dd789c236c9.png;> -- 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
[GitHub] [couchdb] janl commented on a diff in pull request #4394: Mango fields pushdown
janl commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082660139 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. Review Comment: but I’m fine with making this change in a follow-up PR where we go through all our rolling update compat code and merge this as-is #ScopeCreep -- 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
[GitHub] [couchdb] github-code-scanning[bot] commented on a diff in pull request #4291: Import nouveau
github-code-scanning[bot] commented on code in PR #4291: URL: https://github.com/apache/couchdb/pull/4291#discussion_r1082646943 ## java/nouveau/server/src/main/java/org/apache/couchdb/nouveau/core/IndexManager.java: ## @@ -0,0 +1,268 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.apache.couchdb.nouveau.core; + +import java.io.IOException; +import java.nio.file.FileAlreadyExistsException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Duration; +import java.util.stream.Stream; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Response.Status; + +import org.apache.couchdb.nouveau.api.IndexDefinition; +import org.apache.lucene.util.IOUtils; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.caffeine.MetricsStatsCounter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.benmanes.caffeine.cache.CacheLoader; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import com.github.benmanes.caffeine.cache.RemovalCause; +import com.github.benmanes.caffeine.cache.RemovalListener; +import com.github.benmanes.caffeine.cache.Scheduler; + +import io.dropwizard.lifecycle.Managed; + +public final class IndexManager implements Managed { + +private static final Logger LOGGER = LoggerFactory.getLogger(IndexManager.class); + +private class IndexLoader implements CacheLoader { + +@Override +public @Nullable Index load(@NonNull String name) throws Exception { +final Path path = indexPath(name); +final IndexDefinition indexDefinition = objectMapper.readValue(indexDefinitionPath(name).toFile(), +IndexDefinition.class); +return indexFactory.open(path, indexDefinition); +} + +@Override +public @Nullable Index reload(@NonNull String name, @NonNull Index index) throws Exception { +if (index.commit()) { +LOGGER.info("{} committed.", name); +} +return index; +} + +} + +private class IndexRemovalListener implements RemovalListener { + +public void onRemoval(String name, Index index, RemovalCause cause) { +try { +if (index.isOpen()) { +LOGGER.info("{} closing.", name); +index.close(); +if (index.isDeleteOnClose()) { +IOUtils.rm(indexRootPath(name)); +} +} +} catch (final IOException e) { +LOGGER.error(index + " threw exception when closing", e); +} +} +} + +@Min(1) +private int maxIndexesOpen; + +@Min(1) +private int commitIntervalSeconds; + +@Min(1) +private int idleSeconds; + +@NotEmpty +private Path rootDir; + +@NotNull +private AnalyzerFactory analyzerFactory; + +@NotNull +private ObjectMapper objectMapper; + +private IndexFactory indexFactory; + +private MetricRegistry metricRegistry; + +private LoadingCache cache; + +public Index acquire(final String name) throws IOException { +if (!exists(name)) { +throw new WebApplicationException("Index does not exist", Status.NOT_FOUND); +} +return cache.get(name); +} + +public void invalidate(final String name) { +cache.invalidate(name); +} + +public void create(final String name, IndexDefinition indexDefinition) throws IOException { +if (exists(name)) { +throw new WebApplicationException("Index already exists", Status.EXPECTATION_FAILED); +} +// Validate index definiton +analyzerFactory.fromDefinition(indexDefinition); + +// Persist definition +final Path path = indexDefinitionPath(name); +if (Files.exists(path)) { +throw new FileAlreadyExistsException(name + " already exists"); +} +Files.createDirectories(path.getParent()); +
[GitHub] [couchdb] janl commented on a diff in pull request #4394: Mango fields pushdown
janl commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082607599 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. Review Comment: I think enough folks do this and not necessarily within a small round of point releases that would warrant keeping it up until 4.0.0 -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082582977 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. Review Comment: This seems reasonable. My question is: does this removal need to wait for 4.x, given it's not a breaking change, or does it need t wait a couple of minor - or patch - releases? I don't know how many people do rolling upgrades outside of Cloudant, as opposed to just stopping the world for a few minutes. -- 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
[GitHub] [couchdb] janl commented on a diff in pull request #4394: Mango fields pushdown
janl commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082422633 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. Review Comment: might be worth codifying this a little. I know we have other places, but maybe e can start here: maybe we can make a comment like `% x-couch-remove: 4.0.0` that we can then grep for prior to releasing 4.0.0. The reasoning here that we can say: upgrade everything to the latest 3.x version and THEN go to 4.0.0 will be smooth, rather than supporting any 3.x-> 4.0.0 -- 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
[GitHub] [couchdb] tophe closed issue #4385: replication restart from start after server restart
tophe closed issue #4385: replication restart from start after server restart URL: https://github.com/apache/couchdb/issues/4385 -- 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
[GitHub] [couchdb] tophe commented on issue #4385: replication restart from start after server restart
tophe commented on issue #4385: URL: https://github.com/apache/couchdb/issues/4385#issuecomment-1398211068 hi, sorry for the local.ini, if you have get it, you should see that I haven't set the uuid, as you guessed. I set it on each cluster, and restart. Now every thing work as expected. thank you for your support. I closed the issue. -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082305003 ## src/mango/src/mango_cursor_view.erl: ## @@ -441,7 +496,12 @@ doc_member(Cursor, RowProps) -> case mango_util:defer(fabric, open_doc, [Db, Id, Opts]) of {ok, #doc{} = DocProps} -> Doc = couch_doc:to_json_obj(DocProps, []), -match_doc(Selector, Doc, ExecutionStats1); +case match_and_extract_doc(Doc, Selector, Cursor#cursor.fields) of +{match, FinalDoc} -> +{ok, FinalDoc, {execution_stats, ExecutionStats1}}; +{no_match, _} -> Review Comment: There's no reason to leave it unspecified. I wasn't sure whether to go for more "fixed" pattern matching or be freer, so I'm more than happy to change. I'll update and squash in the change to the existing commit. -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082305003 ## src/mango/src/mango_cursor_view.erl: ## @@ -441,7 +496,12 @@ doc_member(Cursor, RowProps) -> case mango_util:defer(fabric, open_doc, [Db, Id, Opts]) of {ok, #doc{} = DocProps} -> Doc = couch_doc:to_json_obj(DocProps, []), -match_doc(Selector, Doc, ExecutionStats1); +case match_and_extract_doc(Doc, Selector, Cursor#cursor.fields) of +{match, FinalDoc} -> +{ok, FinalDoc, {execution_stats, ExecutionStats1}}; +{no_match, _} -> Review Comment: There's no reason to leave it unspecified. I wasn't sure whether to go for more "fixed" pattern matching or be freer, so I'm more than happy to change. I'll update and squash in a new commit. -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082300742 ## src/mango/src/mango_cursor_view.erl: ## @@ -422,16 +472,21 @@ apply_opts([{_, _} | Rest], Args) -> % Ignore unknown options apply_opts(Rest, Args). -doc_member(Cursor, RowProps) -> +doc_member_and_extract(Cursor, RowProps) -> Db = Cursor#cursor.db, Opts = Cursor#cursor.opts, ExecutionStats = Cursor#cursor.execution_stats, Selector = Cursor#cursor.selector, case couch_util:get_value(doc, RowProps) of {DocProps} -> -% only matching documents are returned; the selector -% is evaluated at the shard level in view_cb({row, Row}, -{ok, {DocProps}, {execution_stats, ExecutionStats}}; +% If the query doesn't request quorum doc read via r>1, +% match_and_extract_doc/3 is executed in in view_cb, ie, locally Review Comment: fixed and squashed. -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082069624 ## src/mango/src/mango_cursor_view.erl: ## @@ -441,7 +496,12 @@ doc_member(Cursor, RowProps) -> case mango_util:defer(fabric, open_doc, [Db, Id, Opts]) of {ok, #doc{} = DocProps} -> Doc = couch_doc:to_json_obj(DocProps, []), -match_doc(Selector, Doc, ExecutionStats1); +case match_and_extract_doc(Doc, Selector, Cursor#cursor.fields) of +{match, FinalDoc} -> +{ok, FinalDoc, {execution_stats, ExecutionStats1}}; +{no_match, _} -> Review Comment: Should we assert `{no_match, undefined}` since we know it should be only that as the `no_match` choice? Not a big deal either way but it's nicer to have stronger asserts when possible, unless there is a reason leave it `undefined` (future compatibility?) -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082069624 ## src/mango/src/mango_cursor_view.erl: ## @@ -441,7 +496,12 @@ doc_member(Cursor, RowProps) -> case mango_util:defer(fabric, open_doc, [Db, Id, Opts]) of {ok, #doc{} = DocProps} -> Doc = couch_doc:to_json_obj(DocProps, []), -match_doc(Selector, Doc, ExecutionStats1); +case match_and_extract_doc(Doc, Selector, Cursor#cursor.fields) of +{match, FinalDoc} -> +{ok, FinalDoc, {execution_stats, ExecutionStats1}}; +{no_match, _} -> Review Comment: Should we assert `{no_match, undefined}` since we know it should be only that as the `no_match` choice? -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082067804 ## src/mango/src/mango_cursor_view.erl: ## @@ -422,16 +472,21 @@ apply_opts([{_, _} | Rest], Args) -> % Ignore unknown options apply_opts(Rest, Args). -doc_member(Cursor, RowProps) -> +doc_member_and_extract(Cursor, RowProps) -> Db = Cursor#cursor.db, Opts = Cursor#cursor.opts, ExecutionStats = Cursor#cursor.execution_stats, Selector = Cursor#cursor.selector, case couch_util:get_value(doc, RowProps) of {DocProps} -> -% only matching documents are returned; the selector -% is evaluated at the shard level in view_cb({row, Row}, -{ok, {DocProps}, {execution_stats, ExecutionStats}}; +% If the query doesn't request quorum doc read via r>1, +% match_and_extract_doc/3 is executed in in view_cb, ie, locally Review Comment: two `in`s in `is executed in in view_cb` -- 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
[GitHub] [couchdb] nickva commented on issue #4385: replication restart from start after server restart
nickva commented on issue #4385: URL: https://github.com/apache/couchdb/issues/4385#issuecomment-1397565505 In dock.zip I had noticed local.ini wasn't at text file but some kind of a binary. ``` % cat local.ini �E�c'K�cnO�cuxUT ``` One thing to pay attention is if the replication ID changes. Based on your start_log I see that the checkpoint was *not* found for the catalogues endpoint ``` notice] 2023-01-19T13:30:16.056403Z nonode@nohost <0.1150.0> 34af135719 couch1:5984 192.168.100.227 admin GET /catalogues/ 200 ok 2 [notice] 2023-01-19T13:30:16.131009Z nonode@nohost <0.1150.0> fb7b32c9cd couch1:5984 192.168.100.227 admin GET /catalogues/_local/475a01ff4762aae18390232479a85acd 404 ok 16 [notice] 2023-01-19T13:30:16.133231Z nonode@nohost <0.1150.0> ca52dcf06f couch1:5984 192.168.100.227 admin GET /catalogues/_local/21d33a0db3bd438bc2fe58ef3e64a1a7 404 ok 2 [notice] 2023-01-19T13:30:16.171877Z nonode@nohost <0.1150.0> 9adcacce61 couch1:5984 192.168.100.227 admin GET /catalogues/_local/9dea40c7f506f19799311d927b321449 404 ok 38 [notice] 2023-01-19T13:30:16.173819Z nonode@nohost <0.1150.0> 0ab11d84ae couch1:5984 192.168.100.227 admin GET /catalogues/_local/294224beca58e21bde9e0a5676df7d05 404 ok 1 ``` Notice the 404 on the `_local/$replicationid` docs. Not sure about lotimages_new as the logs start after "Starting replication..." already. So what may be happening is your replication IDs change inadvertently when you update docker configs. If replication IDs change, that means previous checkpoints won't be found, and replication will rewind from 0. Now, if your source, target and other replication parameters stay the same it's most like the the server uuid `[couchdb] uuid = ...` value that's no consistent. The setting is described [here](https://docs.couchdb.org/en/stable/config/couchdb.html#couchdb/uuid) Here is the description on the replication ID generation algorithm: https://docs.couchdb.org/en/stable/replication/protocol.html#generate-replication-id If that is not specified, a random value will be generated, and that would cause your replications IDs to be random every time if you spin up docker containers unless you persist your config or explicitly set `[couchdb] uuid ...`. That value doesn't have to be a proper UUID. You could use a hostname or some other identifier that uniquely identifies the same "cluster". In addition, make sure it's set to the same value on all the nodes in the cluster. If you have 3 nodes (couch1, couch2, couch3 ensure uuid is the same). Checkpoints are persisted on both source and target endpoints (database) in `_local/$base_replication_id` docs. Replications will only resume from a checkpoint if it can find the checkpoint on *both* source and target. So in your logs you could monitor for those 404s and hopefully finally it should find the last one is found (a 200 response). There are usually a few 404s expected as we try to load older versions of replication ID since the algorithm to generate has evolved at least 4 times. Then monitor if replication ID values stay the same or change. -- 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
[GitHub] [couchdb] nickva merged pull request #4387: ci(mac): re-enable mac CI for the full build
nickva merged PR #4387: URL: https://github.com/apache/couchdb/pull/4387 -- 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
[GitHub] [couchdb] nickva closed pull request #4389: ci(mac): re-enable mac CI for the full build
nickva closed pull request #4389: ci(mac): re-enable mac CI for the full build URL: https://github.com/apache/couchdb/pull/4389 -- 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
[GitHub] [couchdb] nickva commented on pull request #4389: ci(mac): re-enable mac CI for the full build
nickva commented on PR #4389: URL: https://github.com/apache/couchdb/pull/4389#issuecomment-1397474748 Original PR's full CI now passes. Closing this one. -- 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
[GitHub] [couchdb] nickva merged pull request #4393: docs(mango): match description of `$mod` with reality (3.2.2)
nickva merged PR #4393: URL: https://github.com/apache/couchdb/pull/4393 -- 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
[GitHub] [couchdb] nickva merged pull request #4392: docs(mango): match description of `$mod` with reality (3.3.x)
nickva merged PR #4392: URL: https://github.com/apache/couchdb/pull/4392 -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1081599218 ## src/mango/src/mango_cursor_view.erl: ## @@ -35,6 +35,19 @@ -define(HEARTBEAT_INTERVAL_IN_USEC, 400). +% viewcbargs wraps up the arguments that view_cb uses into a single +% entry in the mrargs.extra list. We use a Map to allow us to later +% add fields without having old messages causing errors/crashes. +viewcbargs_new(Selector, Fields) -> +#{ +selector => Selector, +fields => Fields +}. +viewcbargs_get(selector, Args) when is_map(Args) -> Review Comment: I'm going to leave this one as is for now. Let me know if you'd rather I change it. -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1081596322 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. +{Selector, Fields} = +case couch_util:get_value(callback_args, Options) of +% old style +undefined -> +{couch_util:get_value(selector, Options), undefined}; +% new style - assume a viewcbargs +Args -> Review Comment: Added the pattern match to the Map as suggested. Squashed into the original commit. -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1081579998 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. +{Selector, Fields} = +case couch_util:get_value(callback_args, Options) of +% old style +undefined -> +{couch_util:get_value(selector, Options), undefined}; +% new style - assume a viewcbargs +Args -> Review Comment: It's a balance, but I think it's slightly better to leak some of the implementation for a stronger assert in the case. It also tells the reader what the types are in that snippet right away ("we are dealing with a map or undefined only") so serves as a shorthand reminder in a way. -- 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
[GitHub] [couchdb] mikerhodes commented on a diff in pull request #4394: Mango fields pushdown
mikerhodes commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1081539012 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. +{Selector, Fields} = +case couch_util:get_value(callback_args, Options) of +% old style +undefined -> +{couch_util:get_value(selector, Options), undefined}; +% new style - assume a viewcbargs +Args -> Review Comment: I wanted to avoid exposing the "internals" of the viewcbargs here. I found you couldn't use your own function in a guard only a BIF, ie, I tried `when is_viewcbargs(Args)`. In the end, perhaps you're right that it's better to leak the Map implementation such that there is a decent guard on the `case` statement -- what do you think, I'm not sure what works well in Erlang here? -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1081520232 ## src/mango/src/mango_cursor_view.erl: ## @@ -248,6 +266,19 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) -> key = couch_util:get_value(key, Row), doc = couch_util:get_value(doc, Row) }, +% This supports receiving our "arguments" either as just the `selector` +% or in the new record in `callback_args`. This is to support mid-upgrade +% clusters where the non-upgraded coordinator nodes will send the older style. +% TODO remove this in a couple of couchdb versions. +{Selector, Fields} = +case couch_util:get_value(callback_args, Options) of +% old style +undefined -> +{couch_util:get_value(selector, Options), undefined}; +% new style - assume a viewcbargs +Args -> Review Comment: We will explicitly match `Args` to be a map in `viewcbargs_get(selector, Args)` but it won't hurt to also match it here as `Args = #{}`. Just to make it clear in this part of the code what we're dealing with. -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4394: Mango fields pushdown
nickva commented on code in PR #4394: URL: https://github.com/apache/couchdb/pull/4394#discussion_r1081514712 ## src/mango/src/mango_cursor_view.erl: ## @@ -35,6 +35,19 @@ -define(HEARTBEAT_INTERVAL_IN_USEC, 400). +% viewcbargs wraps up the arguments that view_cb uses into a single +% entry in the mrargs.extra list. We use a Map to allow us to later +% add fields without having old messages causing errors/crashes. +viewcbargs_new(Selector, Fields) -> +#{ +selector => Selector, +fields => Fields +}. +viewcbargs_get(selector, Args) when is_map(Args) -> Review Comment: Another alternative we typically use is `viewcbargs_get(selector, #{} = Args)` but either way if fine. -- 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
[GitHub] [couchdb] janl commented on pull request #4387: ci(mac): re-enable mac CI for the full build
janl commented on PR #4387: URL: https://github.com/apache/couchdb/pull/4387#issuecomment-1397116512 PATH issue, thanks! -- 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
[GitHub] [couchdb] mikerhodes opened a new pull request, #4394: Mango fields pushdown
mikerhodes opened a new pull request, #4394: URL: https://github.com/apache/couchdb/pull/4394 ## Overview This PR aims to improve Mango by reducing the data transferred to the coordinator during query execution. It may reduce memory or CPU use at the coordinator but that isn't the primary goal. Currently, when documents are read at the shard level, they are compared locally at the shard with the selector to ensure they match before they are sent to the coordinator. This ensures we're not sending documents across the network that the coordinator immediately discards, saving bandwidth and coordinator processing. This PR further executes field projection (`fields` in the query) at the shard level. This should further save bandwidth, particularly for queries that project few fields from large documents. One item of complexity is that a query may request a quorum read of documents, meaning that we need to do the document read at the coordinator and not the shard, then perform the `selector` and `fields` processing there rather than at the shard. To ensure that documents are processed consistently whether at the shard or coordinator, match_and_extract_doc/3 is added. There is still one orphan call outside match_and_extract_doc/2 to extract/2 which supports cluster upgrade and should later be removed. Shard level processing is already performed in a callback, view_cb/2, that's passed to fabric's view processing to run for each row in the view result set. It's used for the shard local selector and fields processing. To make it clear what arguments are destined for this callback, the PR encapsulates the arguments, using viewcbargs_new/2 and viewcbargs_get/2. As we push down more functionality to the shard, the context this function needs to carry with it will increase, so having a record for it will be valuable. Supporting cluster upgrades: The PR supports shard pushdown for Mango `fields` processing for situations during rolling cluster upgrades. (Cloudant require this as they use rolling upgrades). In the state where the coordinator is speaking to an upgraded node, the view_cb/2 needs to support being passed just the `selector` outside of the new viewcbargs record. In this case, the shard will not process fields, but the coordinator will. In the situation where the coordinator is upgraded but the shard is not, we need to send the selector to the shard via `selector` and also execute the fields projection at the coordinator. Therefore we pass arguments to view_cb/2 via both `selector` and `callback_args` and have an apparently spurious field projection (mango_fields:extract/2) in the code that receives back values from the shard ( factored out into doc_member_and_extract). Both of these affordances should only need to exist through one minor version change and be removed thereafter -- if people are jumping several minor versions of CouchDB in one go, hopefully they are prepared for a bit of trouble. Testing upgrade states: As view_cb is completely separate from the rest of the cursor code, we can first try out the branch's code using view_cb from `main`, and then the other way -- the branch's view_cb with the rest of the file from main. I did both of these tests successfully. ## Testing recommendations This PR should not change anything from an end user perspective. Mango responses should remain the same as they currently are. I have run some basic performance locally tests using k6.io, which showed no meaningful change in the latency of requests. ## Related Issues or Pull Requests none. ## Checklist - [x] Code is written and works correctly - [x] 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
[GitHub] [couchdb] pgj opened a new pull request, #4393: docs(mango): match description of `$mod` with reality
pgj opened a new pull request, #4393: URL: https://github.com/apache/couchdb/pull/4393 Backport of aff7a6e7183e6c471a9675e37216baa0bad563a3. -- 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
[GitHub] [couchdb] pgj opened a new pull request, #4392: docs(mango): match description of `$mod` with reality
pgj opened a new pull request, #4392: URL: https://github.com/apache/couchdb/pull/4392 Backport of aff7a6e7183e6c471a9675e37216baa0bad563a3. -- 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
[GitHub] [couchdb] tophe commented on issue #4385: replication restart from start after server restart
tophe commented on issue #4385: URL: https://github.com/apache/couchdb/issues/4385#issuecomment-1397041792 I have just find the problem, it is docker dependent. when you do a docker stop/start everything is ok with replication. but when you update the container, running a docker run, with a new container, the replication restart from the beginning. (I have made change in local.ini) [start_log.txt](https://github.com/apache/couchdb/files/10457293/start_log.txt) [checkpoint_logs.txt](https://github.com/apache/couchdb/files/10457294/checkpoint_logs.txt) I have attache some logs to the post. in checkpoint_log.txt, you can see the last checkpoint for replication lotimages_new. at g1MLeJzLYWBg4MhgTmGQSs4vTc5ISXIoLskvStVLLCopKMpMTtVLyszJAaphSmRIkv in start log, you can see log asked from g1CReJzLYWBgYMpgTmHgzcvPy09JdcjLz8gvLskBCScyJNX in futon, I can see that replication restart from beginning. are the replication checkpoints stored in /opt/couchdb/data, that is a docker binded volume, or are they stored in the container ? and if so where are they stored ? I have attach some docker config in order to reproduce my setup. [dock.zip](https://github.com/apache/couchdb/files/10457471/dock.zip) you can download all the file and then run docker-compose build, docker-compose up to start couchdb container. set up a replication with some datas. after checkpointing, change local.ini , and docker-compose build, docker-compose up, to redeploy a new container. then compare starting point, with checkpoint. -- 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
[GitHub] [couchdb] tophe closed issue #4385: replication restart from start after server restart
tophe closed issue #4385: replication restart from start after server restart URL: https://github.com/apache/couchdb/issues/4385 -- 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
[GitHub] [couchdb] tophe commented on issue #4385: replication restart from start after server restart
tophe commented on issue #4385: URL: https://github.com/apache/couchdb/issues/4385#issuecomment-1396964894 hello, I have do many test stopping and starting all the replication nodes in different order and I can't reproduce the problem, it seem every things are working fine. After restart replication start from their last checkpoint, and start quickly, and run quite fast in 3.3.1. Perhaps this was caused by the upgrade from 3.2.1 to 3.3.1 which restart replication from beginning in the upgrade process ? I see that on many node. thank's for your help (and for that great peace of code). I close the issue. -- 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
[GitHub] [couchdb-glazier] big-r81 merged pull request #20: docs: update installation instructions
big-r81 merged PR #20: URL: https://github.com/apache/couchdb-glazier/pull/20 -- 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
[GitHub] [couchdb-glazier] pgj opened a new pull request, #20: docs: update installation instructions
pgj opened a new pull request, #20: URL: https://github.com/apache/couchdb-glazier/pull/20 - Unify spelling of SpiderMonkey. - Take a note about the missing SSL certificates that would be required for the SpiderMonkey build due to Rust. - Note that questions on `mach bootstrap` might be different. - Mention the concerns on clobbering. - Suggest the reader to verify the presence of the SpiderMonkey static library as probably the most important asset to have. - Start a list of currently known build problems. - Minor markdown nits. -- 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
[GitHub] [couchdb] ishaiavrahami opened a new issue, #4391: Get reduce count for mango query
ishaiavrahami opened a new issue, #4391: URL: https://github.com/apache/couchdb/issues/4391 [NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ ) ## Summary Hello i'm trying to get a count of the query like the reduce option in mango query just like the sort flag true [NOTE]: # ( Provide a brief overview of what the new feature is all about. ) ## Desired Behaviour return count [NOTE]: # ( Tell us how the new feature should work. Be specific. ) [TIP]: # ( Do NOT give us access or passwords to your actual CouchDB! ) ## Possible Solution [NOTE]: # ( Not required. Suggest how to implement the addition or change. ) ## Additional context [TIP]: # ( Why does this feature matter to you? What unique circumstances do you have? ) -- 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
[GitHub] [couchdb] nickva opened a new issue, #4390: Simplify TLS peer verification for replication
nickva opened a new issue, #4390: URL: https://github.com/apache/couchdb/issues/4390 By default replicator TLS connections do not verify the TLS peer certificates https://github.com/apache/couchdb/blob/f8d489f3185accb9acd4d732330d52d9d05bb19a/src/couch_replicator/src/couch_replicator_parse.erl#L474-L478 It's probably for a good reason, Erlang < 25 doesn't even have a good way to load OS provided CAs. Only starting in Erlang 25 we have `public_key:cacerts_get()`. The certificates are loaded and cached in a permanent literal term and then it can be easily used as: ``` {ok, _} = httpc:request(get, {"https://erlang.com;, []}, [{ssl, [{verify, verify_peer}, {cacerts, public_key:cacerts_get()}]}], []), ok. ``` The enhancement would be to make TLS peer verification a bit more ergonomic making it easy to use OS provided CAs. We could backport Erlang 25 cert loading code unto a compat `couch_util` function until we can have Erlang 25+ only required OTP version. Another option is to use [certify](https://github.com/certifi/erlang-certifi), but that's another dependency to bring in and since Erlang already plans on providing the feature might as well use the OTP solution. As for how to configure it, perhaps we could have have a special `ssl_trusted_certificates_file` value indicating we want to load the OS provided CAs, or a separate config option like `ssl_use_os_certificates = true | false`. Maybe even allow appending user's CA trusted certificated to the OS ones? -- 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
[GitHub] [couchdb] nickva commented on issue #4373: POST _revs_diff request stuck without timing out
nickva commented on issue #4373: URL: https://github.com/apache/couchdb/issues/4373#issuecomment-1396069370 It's strange that it times out before even making a connection. Could try also tweaking the number of replication workers, maybe try 1 instead of 4 https://docs.couchdb.org/en/stable/config/replicator.html ``` [replicator] worker_processes = 1 ``` Or try increasing or decreasing the number of connections: ``` [replicator] http_connections = 40 ``` If there are proxies in between they could also be blocking or timing out the connections. It might help inspecting logs there for connection states. -- 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
[GitHub] [couchdb] nickva commented on issue #4259: make check failed in arm64
nickva commented on issue #4259: URL: https://github.com/apache/couchdb/issues/4259#issuecomment-1396062541 @Tom-python0121 sorry for the delayed response. It looks like there is some exception throw. The eunit (the test framework used to run the tests) dumps extra logs in `src/$app/.eunit/couch.log`. In this case it looks like it might be `src/chttpd/.eunit/couch.log`. See if there are any errors or exception there? Since it involves view tests I suspect the spidermonkey (couch js runtime) might not linked or built properly. To run just one test module could try: ``` $ make && make eunit apps=chttpd suites=chttpd_view_test $ cat src/chttpd/.eunit/couch.log ``` req_timedout might also have sometime to do with network or socket setup not working properly and either the server unable to bind to a socket to listen or the test client from reaching the server. -- 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
[GitHub] [couchdb] nickva opened a new pull request, #4389: ci(mac): re-enable mac CI for the full build
nickva opened a new pull request, #4389: URL: https://github.com/apache/couchdb/pull/4389 Full CI test for the https://github.com/apache/couchdb/pull/4387 PR -- 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
[GitHub] [couchdb] nickva merged pull request #4388: Bump recon to 2.5.3
nickva merged PR #4388: URL: https://github.com/apache/couchdb/pull/4388 -- 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
[GitHub] [couchdb] nickva commented on issue #4385: replication restart from start after server restart
nickva commented on issue #4385: URL: https://github.com/apache/couchdb/issues/4385#issuecomment-1387498995 @tophe would you be able to share more details how to reproduce the issue or show some sanitized logs. See if there are any errors / exceptions in the logs which may prevent checkpointing. -- 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
[GitHub] [couchdb] nickva commented on issue #4385: replication restart from start after server restart
nickva commented on issue #4385: URL: https://github.com/apache/couchdb/issues/4385#issuecomment-1387497652 @tophe thanks for your report. I had tried setting up a local replication with the 3.3.1 release and I couldn't not reproduce the same issue. I had created database a and b then continuous replication a ->b. Added 3 docs to a and they were replicated to b. In about 10-30 seconds the replication checkpointed. ``` [notice] 2023-01-18T17:56:53.418762Z couchdb@127.0.0.1 <0.2488.0> 95114e5b09 localhost:5984 127.0.0.1 adm POST /_replicator 201 ok 63 [notice] 2023-01-18T17:56:53.434113Z couchdb@127.0.0.1 <0.452.0> couch_replicator_scheduler: Job {"0a62088f656e39570a8b89ff61c55a32","+continuous"} started as <0.3587.0> [notice] 2023-01-18T17:56:54.160151Z couchdb@127.0.0.1 <0.3587.0> Starting replication 0a62088f656e39570a8b89ff61c55a32+continuous (http://localhost:5984/a/ -> http://localhost:5984/b/) from doc _replicator:a_b worker_procesess:4 worker_batch_size:500 session_id:3835f379fc390834e23283ac1ee96921 [notice] 2023-01-18T17:56:54.160194Z couchdb@127.0.0.1 <0.3587.0> Document `a_b` triggered replication `0a62088f656e39570a8b89ff61c55a32+continuous` [notice] 2023-01-18T17:57:04.154748Z couchdb@127.0.0.1 <0.3508.0> adf93f2899 localhost:5984 127.0.0.1 adm GET /a/_changes?feed=continuous=all_docs=0=1 200 ok 10002 [notice] 2023-01-18T17:57:10.375115Z couchdb@127.0.0.1 <0.3848.0> f244ad9969 127.0.0.1:5984 127.0.0.1 adm PUT /a/doc1 201 ok 45 [notice] 2023-01-18T17:57:10.380111Z couchdb@127.0.0.1 <0.3508.0> b9e856c7f2 localhost:5984 127.0.0.1 adm POST /b/_revs_diff 200 ok 3 [notice] 2023-01-18T17:57:10.383908Z couchdb@127.0.0.1 <0.3508.0> dbd855b8ef localhost:5984 127.0.0.1 adm POST /a/_bulk_get?latest=true=true=false 200 ok 3 [notice] 2023-01-18T17:57:10.429121Z couchdb@127.0.0.1 <0.3508.0> 2d0a333f54 localhost:5984 127.0.0.1 adm POST /b/_bulk_docs 201 ok 45 [notice] 2023-01-18T17:57:13.487160Z couchdb@127.0.0.1 <0.3934.0> a9b147a109 127.0.0.1:5984 127.0.0.1 adm PUT /a/doc2 201 ok 45 [notice] 2023-01-18T17:57:13.489662Z couchdb@127.0.0.1 <0.3508.0> 63619c5d6c localhost:5984 127.0.0.1 adm POST /b/_revs_diff 200 ok 1 [notice] 2023-01-18T17:57:13.491367Z couchdb@127.0.0.1 <0.3508.0> c0cacc79b7 localhost:5984 127.0.0.1 adm POST /a/_bulk_get?latest=true=true=false 200 ok 1 [notice] 2023-01-18T17:57:13.535906Z couchdb@127.0.0.1 <0.3508.0> 2d41df816b localhost:5984 127.0.0.1 adm POST /b/_bulk_docs 201 ok 44 [notice] 2023-01-18T17:57:16.258849Z couchdb@127.0.0.1 <0.3996.0> 2d94c3294d 127.0.0.1:5984 127.0.0.1 adm PUT /a/doc3 201 ok 47 [notice] 2023-01-18T17:57:16.261490Z couchdb@127.0.0.1 <0.3508.0> e31b4295ae localhost:5984 127.0.0.1 adm POST /b/_revs_diff 200 ok 1 [notice] 2023-01-18T17:57:16.263704Z couchdb@127.0.0.1 <0.3508.0> ff5130158b localhost:5984 127.0.0.1 adm POST /a/_bulk_get?latest=true=true=false 200 ok 2 [notice] 2023-01-18T17:57:16.308776Z couchdb@127.0.0.1 <0.3508.0> cca6245826 localhost:5984 127.0.0.1 adm POST /b/_bulk_docs 201 ok 44 [notice] 2023-01-18T17:57:24.150590Z couchdb@127.0.0.1 <0.3508.0> 28eb6a2108 localhost:5984 127.0.0.1 adm POST /b/_ensure_full_commit 201 ok 1 [notice] 2023-01-18T17:57:24.153638Z couchdb@127.0.0.1 <0.4101.0> 058625e2ed localhost:5984 127.0.0.1 adm POST /a/_ensure_full_commit 201 ok 1 [notice] 2023-01-18T17:57:24.153885Z couchdb@127.0.0.1 <0.3587.0> recording a checkpoint for `http://localhost:5984/a/` -> `http://localhost:5984/b/` at source update_seq <<"3-g1CbeJzLYWBgYMpgTmEQTM4vTc5ISXIwNDLXMwBCwxyQVCJDUv3___-zMpgTmXKBAuwpSZYpKYZG2DTgMSaPBUgyNACp_1DTGMGmGSUbpJqlpWLTlwUAQGgo3g">> [notice] 2023-01-18T17:57:24.201998Z couchdb@127.0.0.1 <0.4101.0> 755dff440c localhost:5984 127.0.0.1 adm PUT /a/_local/0a62088f656e39570a8b89ff61c55a32 201 ok 44 [notice] 2023-01-18T17:57:24.247853Z couchdb@127.0.0.1 <0.4101.0> d74241de62 localhost:5984 127.0.0.1 adm PUT /b/_local/0a62088f656e39570a8b89ff61c55a32 201 ok 45 ``` Then I stopped the server and restarted it. ``` [notice] 2023-01-18T17:59:42.941977Z couchdb@127.0.0.1 <0.463.0> couch_replicator_scheduler: Job {"0a62088f656e39570a8b89ff61c55a32","+continuous"} started as <0.604.0> [notice] 2023-01-18T17:59:47.455475Z couchdb@127.0.0.1 <0.621.0> 6ac77267da localhost:5984 127.0.0.1 undefined POST /_session 200 ok 22 [notice] 2023-01-18T17:59:47.486406Z couchdb@127.0.0.1 <0.621.0> cdc7a9e140 localhost:5984 127.0.0.1 adm GET /a/ 200 ok 30 [notice] 2023-01-18T17:59:47.487452Z couchdb@127.0.0.1 <0.621.0> 67d6faf300 localhost:5984 127.0.0.1 undefined POST /_session 200 ok 1 [notice] 2023-01-18T17:59:47.490253Z couchdb@127.0.0.1 <0.621.0> f51f7e3d93 localhost:5984 127.0.0.1 adm GET /b/ 200 ok 2 [notice] 2023-01-18T17:59:47.491681Z couchdb@127.0.0.1 <0.621.0> 3590309197 localhost:5984 127.0.0.1 adm GET /a/ 200 ok 1
[GitHub] [couchdb] nickva opened a new pull request, #4388: Bump rebar to 2.5.3
nickva opened a new pull request, #4388: URL: https://github.com/apache/couchdb/pull/4388 Changes since 2.5.2: https://github.com/ferd/recon/compare/2.5.2...2.5.3 -- 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
[GitHub] [couchdb] big-r81 merged pull request #4384: Adding build-report makefile target on Windows
big-r81 merged PR #4384: URL: https://github.com/apache/couchdb/pull/4384 -- 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
[GitHub] [couchdb] big-r81 closed issue #4377: Missing `build-report` makefile target on Windows
big-r81 closed issue #4377: Missing `build-report` makefile target on Windows URL: https://github.com/apache/couchdb/issues/4377 -- 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
[GitHub] [couchdb-nano] jkeczan commented on issue #322: Replication Enable creating incorrect document
jkeczan commented on issue #322: URL: https://github.com/apache/couchdb-nano/issues/322#issuecomment-1387315923 I had already figured that one out as a workaround after I posted the issue but thought it was odd that the replicate function didn't create a document that could be replicated. Appreciate the feedback. -- 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
[GitHub] [couchdb] rnewson merged pull request #4379: docs(mango): match description of `$mod` with reality
rnewson merged PR #4379: URL: https://github.com/apache/couchdb/pull/4379 -- 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
[GitHub] [couchdb] nickva commented on a diff in pull request #4386: chore(readme): update mac dev install instructions
nickva commented on code in PR #4386: URL: https://github.com/apache/couchdb/pull/4386#discussion_r1073714355 ## README-DEV.rst: ## @@ -115,15 +115,18 @@ Unless you want to install the optional dependencies, skip to the next section. Install what else we can with Homebrew:: -brew install help2man gnupg md5sha1sum node python +brew install \ + erlang \ + elixir \ + help2man \ + node \ + python \ + spidermonkey -If you don't already have pip installed, install it:: - -sudo easy_install pip Now, install the required Python packages:: -sudo pip install sphinx docutils pygments sphinx_rtd_theme +pip3 install sphinx docutils pygments sphinx_rtd_theme Review Comment: Technically for doc for local dev just having python3 with pip is enough. We do most of the requirements in a venv anyway https://github.com/apache/couchdb/tree/main/src/docs https://github.com/apache/couchdb/blob/main/src/docs/requirements.txt ## README-DEV.rst: ## @@ -115,15 +115,18 @@ Unless you want to install the optional dependencies, skip to the next section. Install what else we can with Homebrew:: -brew install help2man gnupg md5sha1sum node python +brew install \ + erlang \ + elixir \ + help2man \ + node \ + python \ + spidermonkey -If you don't already have pip installed, install it:: - -sudo easy_install pip Now, install the required Python packages:: -sudo pip install sphinx docutils pygments sphinx_rtd_theme +pip3 install sphinx docutils pygments sphinx_rtd_theme Review Comment: Technically, for docs for local dev just having python3 with pip is enough. We do most of the requirements in a venv anyway https://github.com/apache/couchdb/tree/main/src/docs https://github.com/apache/couchdb/blob/main/src/docs/requirements.txt -- 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
[GitHub] [couchdb] janl commented on a diff in pull request #4380: chore(configure): be more defensive about SpiderMonkey location
janl commented on code in PR #4380: URL: https://github.com/apache/couchdb/pull/4380#discussion_r1073670697 ## configure: ## @@ -230,6 +235,26 @@ then exit 1 fi +if [ "${ERLANG_OS}" = "unix" ] +then Review Comment: most other ifs use the other way around, let’s take the opportunity and unify all this :) -- 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
[GitHub] [couchdb] nickva commented on pull request #4387: ci(mac): re-enable mac CI for the full build
nickva commented on PR #4387: URL: https://github.com/apache/couchdb/pull/4387#issuecomment-1387223459 Use the `jenkins-*`-like branch name so the full CI will run on the PR. That's a good way to test full CI changes in a PR. -- 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
[GitHub] [couchdb] janl opened a new pull request, #4387: ci(mac): re-enable mac CI for the full build
janl opened a new pull request, #4387: URL: https://github.com/apache/couchdb/pull/4387 ## Overview ## Testing recommendations ## 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
[GitHub] [couchdb] janl opened a new pull request, #4386: chore(readme): update mac dev install instructions
janl opened a new pull request, #4386: URL: https://github.com/apache/couchdb/pull/4386 ## Overview ## Testing recommendations ## 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
[GitHub] [couchdb-mango] hklarner closed pull request #48: adds operators $sizeLte and $sizeGte
hklarner closed pull request #48: adds operators $sizeLte and $sizeGte URL: https://github.com/apache/couchdb-mango/pull/48 -- 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
[GitHub] [couchdb] hklarner closed pull request #3582: adds operators $sizeLte and $sizeGte
hklarner closed pull request #3582: adds operators $sizeLte and $sizeGte URL: https://github.com/apache/couchdb/pull/3582 -- 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
[GitHub] [couchdb] big-r81 commented on issue #4376: Missing `weatherreport-test` makefile target on Windows
big-r81 commented on issue #4376: URL: https://github.com/apache/couchdb/issues/4376#issuecomment-1387150304 Update: Discussion with Robert on Slack: > weatherreport was built with Linux in mind and nothing else afaicr since it was for when Cloudant had customers running a build local to them, we needed a tool to extract basic "wtf" info. and we only permitted installs on Linux. It seems, the weatherreport needs some linux tools (ps) to work. These needs to be evaluated to find a equivalent for Windows with the same function/command output. To get weatherreport running, there needs to be added the following files: `bin/weatherreport.cmd` (Needs to be created, when CouchDB compiles): ``` @echo off escript.exe "%~dpn0" %* ``` `Makefile.win`: ``` index a897554e7..55c4f3b33 100644 --- a/Makefile.win +++ b/Makefile.win @@ -97,7 +97,7 @@ TEST_OPTS=-c startup_jitter=0 -c default_security=admin_local .PHONY: all # target: all - Build everything -all: couch fauxton docs +all: couch fauxton docs escriptize @@ -124,6 +124,11 @@ endif # target: fauxton - Build Fauxton web UI fauxton: share\www +.PHONY: escriptize +# target: escriptize - Build CLI tools +escriptize: couch + @$(REBAR) -r escriptize apps=weatherreport + @cp src/weatherreport/weatherreport bin/weatherreport # Testing @@ -264,6 +269,11 @@ mango-test: devclean all .venv\Scripts\pip.exe install -r requirements.txt @cd src\mango && .venv\Scripts\python.exe ..\..\dev\run -n 1 --admin=testuser:testpass .venv\Scripts\nose2 +.PHONY: weatherreport-test +# target: weatherreport-test - Run weatherreport against dev cluster +weatherreport-test: devclean escriptize + @dev\run -n 1 -a adm:pass --no-eval \ + 'bin\weatherreport --etc dev\lib\node1\etc --level error' # Developing ``` -- 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
[GitHub] [couchdb] tophe opened a new issue, #4385: replication restart from start after server restart
tophe opened a new issue, #4385: URL: https://github.com/apache/couchdb/issues/4385 [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ ) ## Description Hello, since the upgrade in v3.3.1, I see that when a server restart, all replications restart from scatch. I don't know if it is a new functionality, but when you have 10 replications with 20M records, the server become useless for many many hours, the replications process use all the server io, and the server become unresponsive. [NOTE]: # ( Describe the problem you're encountering. ) [TIP]: # ( Do NOT give us access or passwords to your actual CouchDB! ) ## Steps to Reproduce setup a replication with many records, complete it, restart the server. [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. ) ## Expected Behaviour Replications shouldn't restart from the begining, but from their latest positions. So the server is available as soon as it restart. pausing and starting and reseting replication through the api, should be a great help. [NOTE]: # ( Tell us what you expected to happen. ) ## Your Environment docker official image. [TIP]: # ( Include as many relevant details about your environment as possible. ) [TIP]: # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. ) * CouchDB version used: 3.3.1 * Browser name and version: firefox * Operating system and version: debian bulleyes ## Additional Context [TIP]: # ( Add any other context about the problem here. ) -- 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
[GitHub] [couchdb-nano] glynnbird closed issue #322: Replication Enable creating incorrect document
glynnbird closed issue #322: Replication Enable creating incorrect document URL: https://github.com/apache/couchdb-nano/issues/322 -- 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
[GitHub] [couchdb-nano] glynnbird commented on issue #322: Replication Enable creating incorrect document
glynnbird commented on issue #322: URL: https://github.com/apache/couchdb-nano/issues/322#issuecomment-1386719578 Thanks for the reports @jkeczan but I don't think "replication.enable" is doing anything unexpected here. As you can see from the [code](https://github.com/apache/couchdb-nano/blob/main/lib/nano.js#L586-L598), its job is to create a document in the `_replicator` database with a source and target in it. If I were you I would just write the document yourself and you get complete control: e.g. ```js const replicator = nano.db.use('_replicator') const doc = { source: 'https://mysourceurl.com/a', target: 'https://myothersourceurl.com/b', create_target: true } await replicator.insert(doc) ``` -- 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
[GitHub] [couchdb] big-r81 opened a new pull request, #4384: Adding build-report makefile target on Windows
big-r81 opened a new pull request, #4384: URL: https://github.com/apache/couchdb/pull/4384 Backporting the `build-report` target from the *nix makefile to the Windows pendant. ## Overview Run this on Windows: ``` PS C:\relax\couchdb> make -f Makefile.win build-report ``` ## Testing recommendations ``` PS C:\relax\couchdb> cat .\test-results.log Skipped === EXUnit - AuthCacheTest - AuthCacheTest - test auth cache management: due to pending filter EXUnit - BasicsTest - BasicsTest - test On restart, a request for creating an already existing db can not override: due to pending filter EXUnit - BasicsTest - BasicsTest - test PUT doc has a Location header: due to pending filter EXUnit - BasicsTest - BasicsTest - test Regression test for COUCHDB-954: due to pending filter EXUnit - CompactTest - CompactTest - test compaction reduces size of deleted docs: due to pending filter EXUnit - ConfigTest - ConfigTest - test CouchDB respects configured protocols: due to pending filter EXUnit - ConfigTest - ConfigTest - test PORT `BUGGED` ?raw tests from config.js: due to pending filter EXUnit - PartitionAllDocsTest - PartitionAllDocsTest - test partition _all_docs with timeout: due to pending filter EXUnit - WithQuorumTest - WithQuorumTest - test Attachments overriden quorum should return 202-Acepted: due to with_quorum_test filter EXUnit - WithQuorumTest - WithQuorumTest - test Attachments should return 201-Created: due to with_quorum_test filter EXUnit - WithQuorumTest - WithQuorumTest - test Bulk docs overriden quorum should return 202-Acepted: due to with_quorum_test filter EXUnit - WithQuorumTest - WithQuorumTest - test Bulk docs should return 201-Created: due to with_quorum_test filter EXUnit - WithQuorumTest - WithQuorumTest - test Copy doc should return 201-Created: due to with_quorum_test filter EXUnit - WithQuorumTest - WithQuorumTest - test Creating-Updating/Deleting doc should return 201-Created/200-OK: due to with_quorum_test filter EXUnit - WithQuorumTest - WithQuorumTest - test Creating-Updating/Deleting doc with overriden quorum should return 202-Acepted/200-OK: due to with_quorum_test filter EXUnit - WithQuorumTest - WithQuorumTest - test Creating/Deleting DB should return 201-Created/202-Acepted: due to with_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Attachments overriden quorum should return 201-Created: due to without_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Attachments should return 202-Acepted: due to without_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Bulk docs overriden quorum should return 201-Created: due to without_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Bulk docs should return 202-Acepted: due to without_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Copy doc should return 202-Acepted: due to without_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Creating-Updating/Deleting doc with overriden quorum should return 201-Created/200-OK: due to without_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Creating/Deleting DB should return 202-Acepted: due to without_quorum_test filter EXUnit - WithoutQuorumTest - WithoutQuorumTest - test Creating/Updating/Deleting doc should return 202-Acepted: due to without_quorum_test filter Collections === TotalFixture Test Count Failed ErrorsSkipped 113.1s 0.0s 113.1s558 0 0 24 EXUnit 0.0s 0.0s 0.0s 0 0 0 0 EUnit 0.0s 0.0s 0.0s 0 0 0 0 JavaScript 0.0s 0.0s 0.0s 0 0 0 0 Mango Suites == TotalFixture Test Count Failed ErrorsSkipped 16.0s 0.0s 16.0s 17 0 0 0 EXUnit - ReplicationTest 6.7s 0.0s 6.7s 4 0 0 0 EXUnit - ReduceTest 5.9s 0.0s 5.9s 10 0 0 0 EXUnit - ChangesAsyncTest 5.7s 0.0s 5.7s 2 0 0 0 EXUnit - UsersDbTest 4.8s 0.0s 4.8s 6 0 0 0 EXUnit - ViewPaginationTest 4.7s 0.0s 4.7s 3 0 0 0 EXUnit - ReduceBuiltinTest 4.1s 0.0s 4.1s 3 0 0 0 EXUnit - BatchSaveTest 3.3s 0.0s 3.3s 9 0 0 0 EXUnit
[GitHub] [couchdb] nickva commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
nickva commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1386457446 I extracted the commit which modified the `Jenkinsfile.pr` into a separate PR to allow this PR to run in the CI again https://github.com/apache/couchdb/pull/4383 -- 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
[GitHub] [couchdb] nickva merged pull request #4383: Set the SpiderMonkey version for the first phase of PR builds
nickva merged PR #4383: URL: https://github.com/apache/couchdb/pull/4383 -- 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
[GitHub] [couchdb] nickva commented on pull request #4382: Pr 4380 spidermonkey check
nickva commented on PR #4382: URL: https://github.com/apache/couchdb/pull/4382#issuecomment-1386434026 Closing PR now that the check is complete. Pulled out the Jenkinsfile.pr bit into a separate PR https://github.com/apache/couchdb/pull/4383 to help the original one make progress. -- 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
[GitHub] [couchdb] nickva closed pull request #4382: Pr 4380 spidermonkey check
nickva closed pull request #4382: Pr 4380 spidermonkey check URL: https://github.com/apache/couchdb/pull/4382 -- 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
[GitHub] [couchdb] nickva opened a new pull request, #4383: Set the SpiderMonkey version for the first phase of PR builds
nickva opened a new pull request, #4383: URL: https://github.com/apache/couchdb/pull/4383 Merging this separately to help out the original PR https://github.com/apache/couchdb/pull/4380 This is my +1 for this commit. The discussion is still taking place in the original PR -- 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
[GitHub] [couchdb] nickva opened a new pull request, #4382: Pr 4380 spidermonkey check
nickva opened a new pull request, #4382: URL: https://github.com/apache/couchdb/pull/4382 The `configure` script does not check whether SpiderMonkey actually exists at the presumed location. This may go wrong when the user has a version different from the default one. The mistake is spotted only in build time, indirectly, via missing header files. That is too late and it may not be evident for the user what the problem is. Add a user-friendly safeguard for Unix-like systems to prevent this from happening. (Authored-by: [pgj](https://github.com/pgj)) Making another PR to force Jenkins CI to rebuild it -- 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
[GitHub] [couchdb-nano] jkeczan opened a new issue, #322: Replication Enable creating correct document
jkeczan opened a new issue, #322: URL: https://github.com/apache/couchdb-nano/issues/322 We are having issues with creating replications using ```replication.enable```. The server accepts the request but the replication document does not contain the correct replication information therefore it doesn't start ## Expected Behavior When we call ```replication.enable(source, target, {create_target: false})```, we expect the source of the replication document to look like the following: ``` { "_id": "9d2ad6fedf2c919a28463cef8800086c", "_rev": "1-1a6c06225aca25efad513b58ee0866bd", "user_ctx": { "name": "admin", "roles": [ "_admin", "_reader", "_writer" ] }, "source": { "url": "https://test.url.com:5984/soloDB-5-63;, "headers": { "Authorization": "Basic JIMBOB==" } }, "target": { "url": "mainDB", "headers": { "Authorization": "Basic JOHNSMITH==" } }, "create_target": false, "continuous": true, "owner": "admin" } ``` ## Current Behavior However, we are currently getting this document instead with the replication failing to launch and the UI showing it does NOT see any credentials. ``` { "_id": "7131260c0b1a10fddb66464ce802eb2d", "_rev": "1-7d100014ab0dc2b18548e06d63f17940", "continuous": true, "create_target": false, "source": "https://user:p...@test.url.com:5984/soloDB-5-27;, "target": "mainDB", "owner": "admin" } ``` ## Possible Solution At this point, I do not have a possible solution other than potentially dropping down to make a custom request. However, I feel like I am doing something incorrect here and wanted to reach out first. ## Steps to Reproduce (for bugs) ``` const url = 'test.url.com'; const sourceURL = `https://user:pass@${url}/soloDB-5-27`; const targetURL = `mainDB`; return database.db.replication.enable(sourceURL, targetURL, { continuous: true, create_target: false, }); ``` ## Context Right now, this is preventing me from writing an automated onboarding tool that creates the database for a user when they are added to our HR databases. ## Your Environment * Version used: 10.1.0 * Browser Name and version: * Operating System and version (desktop or mobile): ECS w/latest Docker Image * Link to your project: N/A -- 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
[GitHub] [couchdb-helm] willholley merged pull request #108: Automatically finalize the cluster with a post-install job
willholley merged PR #108: URL: https://github.com/apache/couchdb-helm/pull/108 -- 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
[GitHub] [couchdb] nickva commented on issue #4378: v3.3.1 compaction smoosh config
nickva commented on issue #4378: URL: https://github.com/apache/couchdb/issues/4378#issuecomment-1385724686 Thank you for reaching out, @tophe. Good idea to add this info documentation, that's would have helped in this case. -- 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
[GitHub] [couchdb] pgj commented on a diff in pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on code in PR #4380: URL: https://github.com/apache/couchdb/pull/4380#discussion_r1072397056 ## configure: ## @@ -230,6 +235,26 @@ then exit 1 fi +if [ "${ERLANG_OS}" = "unix" ] +then Review Comment: Hrm, I see exactly the opposite. For example, see the previous `if` block (`if [ "${ARCH}" = "aarch64" ] ...`). -- 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
[GitHub] [couchdb] pgj commented on a diff in pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on code in PR #4380: URL: https://github.com/apache/couchdb/pull/4380#discussion_r1072377400 ## configure: ## @@ -30,10 +30,15 @@ WITH_DOCS=1 ERLANG_MD5="false" SKIP_DEPS=0 +run_erlang() { +erl -noshell -eval "$1" -eval "halt()." +} + COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)" SM_VSN=${SM_VSN:-"91"} ARCH="$(uname -m)" -ERLANG_VER="$(erl -eval 'io:put_chars(erlang:system_info(otp_release)), halt().' -noshell)" +ERLANG_VER="$(run_erlang 'io:put_chars(erlang:system_info(otp_release)).')" +ERLANG_OS="$(run_erlang 'case os:type() of {OS, _} -> io:format("~s~n", [OS]) end.')" Review Comment: The reason for this is twofold: I wanted to be consistent with `rebar` / Erlang runtime (I would consider `unix` what it thinks to be UNIX) and avoid reimplementing the same logic in shell 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
[GitHub] [couchdb] pgj commented on a diff in pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on code in PR #4380: URL: https://github.com/apache/couchdb/pull/4380#discussion_r1072377400 ## configure: ## @@ -30,10 +30,15 @@ WITH_DOCS=1 ERLANG_MD5="false" SKIP_DEPS=0 +run_erlang() { +erl -noshell -eval "$1" -eval "halt()." +} + COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)" SM_VSN=${SM_VSN:-"91"} ARCH="$(uname -m)" -ERLANG_VER="$(erl -eval 'io:put_chars(erlang:system_info(otp_release)), halt().' -noshell)" +ERLANG_VER="$(run_erlang 'io:put_chars(erlang:system_info(otp_release)).')" +ERLANG_OS="$(run_erlang 'case os:type() of {OS, _} -> io:format("~s~n", [OS]) end.')" Review Comment: The reason for this twofold: I wanted to be consistent with `rebar` / Erlang runtime (I would consider `unix` what it thinks to be UNIX) and avoid reimplementing the same logic in shell 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
[GitHub] [couchdb] janl commented on a diff in pull request #4380: chore(configure): be more defensive about SpiderMonkey location
janl commented on code in PR #4380: URL: https://github.com/apache/couchdb/pull/4380#discussion_r1072364924 ## configure: ## @@ -30,10 +30,15 @@ WITH_DOCS=1 ERLANG_MD5="false" SKIP_DEPS=0 +run_erlang() { +erl -noshell -eval "$1" -eval "halt()." +} + COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)" SM_VSN=${SM_VSN:-"91"} ARCH="$(uname -m)" -ERLANG_VER="$(erl -eval 'io:put_chars(erlang:system_info(otp_release)), halt().' -noshell)" +ERLANG_VER="$(run_erlang 'io:put_chars(erlang:system_info(otp_release)).')" +ERLANG_OS="$(run_erlang 'case os:type() of {OS, _} -> io:format("~s~n", [OS]) end.')" Review Comment: shell scripts usually use `uname` for this type of stuff. Any particular reason why you chose this? — There is nothing wrong, just curious. ## configure: ## @@ -230,6 +235,26 @@ then exit 1 fi +if [ "${ERLANG_OS}" = "unix" ] +then Review Comment: small style nitpick, the rest of the file uses `if []; then` -- 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
[GitHub] [couchdb] big-r81 commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
big-r81 commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385538700 Yeah, I'm wondering too atm... -- 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
[GitHub] [couchdb] pgj commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385529390 Hrm, that is interesting. I have checked the corresponding `rebar` scripts and only these paths were included on the C compiler flags. -- 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
[GitHub] [couchdb] big-r81 commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
big-r81 commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385520096 Are these the only possibilities for the paths? On my macOs it's ``` /usr/local/Cellar/spidermonkey/91.13.0_1/include/mozjs-91/ ``` -- 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
[GitHub] [couchdb] pgj commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385509568 @big-r81 do you have any ideas why this current version fails on the CI? Initially I thought that is due to `--skip-deps` but by browsing the code, it seems to be unrelated. -- 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
[GitHub] [couchdb] pgj commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385507303 Sure, I am happy to consider the Windows bits as well. Maybe I can find a Windows system somewhere to poke around with this. -- 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
[GitHub] [couchdb] big-r81 commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
big-r81 commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385496488 It's only a reminder, because it ends in like this and this #4376 and #4377. We hopefully have our Windows CI soon in our Jenkins-[Pipeline](https://github.com/apache/couchdb/pull/4371)... -- 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
[GitHub] [couchdb] pgj commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385488222 Hi @big-r81 : I tried to mention that this is for Unix-based systems -- I do not have a Windows instance around to experiment with the changes. But I can take a chance with that. -- 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
[GitHub] [couchdb] pgj commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
pgj commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385486336 Oh, and it seems I also did not consider the `--skip-deps` flag either. -- 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
[GitHub] [couchdb] big-r81 commented on pull request #4380: chore(configure): be more defensive about SpiderMonkey location
big-r81 commented on PR #4380: URL: https://github.com/apache/couchdb/pull/4380#issuecomment-1385473347 Hi, we should always port changes in configure and Makefile to the windows powershell scripts too… -- 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
[GitHub] [couchdb] StephanU opened a new issue, #4381: CouchDB 3.3.1 for MacOS is missing Spidermonkey
StephanU opened a new issue, #4381: URL: https://github.com/apache/couchdb/issues/4381 [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ ) ## Description [NOTE]: # ( Describe the problem you're encountering. ) [TIP]: # ( Do NOT give us access or passwords to your actual CouchDB! ) It seems like the "bundled" Apache CouchDB for MacOS does not contain Spidermonkey (anymore). The result is, that views cannot be created ("Verify Installation" fails in the "Create View" step). Manually creating views results in an error "500 internal server error". The couchdb log is flooded with the following message: ``` [info] 2023-01-17T13:48:05.756841Z couchdb@localhost <0.298.0> couch_proc_manager <0.12658.0> died normal [error] 2023-01-17T13:48:05.756890Z couchdb@localhost <0.1176.0> OS Process Error <0.12658.0> :: {os_process_error,{exit_status,134}} ``` Installing Spidermonkey manually (`brew install spidermonkey`) solves the problem. Using CouchDB 3.1.1 this works out of the box (without installing spidermonkey manually). I think this issue #4296 has the same problem, but with version 3.2.2. ``` % ./couchjs -V dyld[69565]: Library not loaded: /usr/local/opt/spidermonkey/lib/libmozjs-91.dylib Referenced from: <2EEBCDB5-670B-39A8-8361-18D50EA6898C> /Users/stephan/Downloads/Apache CouchDB.app/Contents/Resources/couchdbx-core/bin/couchjs Reason: tried: '/usr/local/opt/spidermonkey/lib/libmozjs-91.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/spidermonkey/lib/libmozjs-91.dylib' (no such file), '/usr/local/opt/spidermonkey/lib/libmozjs-91.dylib' (no such file), '/usr/lib/libmozjs-91.dylib' (no such file, not in dyld cache) zsh: abort ./couchjs -V ``` ## Steps to Reproduce [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. ) - Download Apache CouchDb 3.3.1 for MacOs. - Make sure you **don't** have spidermonkey installed. - Start the CouchDB and execute "Verifiy Installation", it will fail when creating the view. ## Expected Behaviour [NOTE]: # ( Tell us what you expected to happen. ) - Installing the "Apache CouchDB native application" for MacOS should work out of the box. ## Your Environment [TIP]: # ( Include as many relevant details about your environment as possible. ) [TIP]: # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. ) * CouchDB version used: 3.3.1 * Browser name and version: * Operating system and version: macOS Ventura 13.1 ## Additional Context [TIP]: # ( Add any other context about the problem here. ) -- 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
[GitHub] [couchdb] pgj opened a new pull request, #4380: chore(configure): be more defensive about SpiderMonkey location
pgj opened a new pull request, #4380: URL: https://github.com/apache/couchdb/pull/4380 The `configure` script does not check whether SpiderMonkey actually exists at the presumed location. This may go wrong when the user has a version different from the default one. The mistake is spotted only in build time, indirectly, via missing header files. That is too late and it may not be evident for the user what the problem is. Add a user-friendly safeguard for Unix-like systems to prevent this from happening. -- 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
[GitHub] [couchdb] chiraganand commented on issue #4373: POST _revs_diff request stuck without timing out
chiraganand commented on issue #4373: URL: https://github.com/apache/couchdb/issues/4373#issuecomment-1385324941 > Perhaps we're hitting a limit somewhere - disk usage, CPU, network. What about other requests, just _revs_diffs or do _bulk_docs also do this sometimes? I checked `_revs_diff` endpoint by running JMeter (10 threads x 100 iterations) and it kind of hangs after some 700 requests. The request times out after 120 seconds or so even before making a connection. Though I could not see any load increase on the server. No CPU waiting times, enough physical memory available, and enough bandwidth available. > See if there is a log on the server with that timestamp. Is there a difference between payloads (bodies) between the succeeding requests and failing ones? No, I used the same request. > Also, 3.3.1 has a few _revs_diff optimizations, if you have a chance could try experimenting upgrading on a test instance to see if you still see the same issue. Yes, will try this. Just want to gather some more evidence before trying with the new Couch version. -- 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
[GitHub] [couchdb-helm] willholley merged pull request #109: chore: update chart-testing dependencies
willholley merged PR #109: URL: https://github.com/apache/couchdb-helm/pull/109 -- 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
[GitHub] [couchdb] tophe commented on issue #4378: v3.3.1 compaction smoosh config
tophe commented on issue #4378: URL: https://github.com/apache/couchdb/issues/4378#issuecomment-1385202465 so, I have disable the [smoosh.upgrade_dbs] concurrency = 0 don't change anything. then [smoosh.ratio_dbs] concurrency = 0 don't change anything then [smoosh.slack_dbs] concurrency = 0 oh great the compaction stop on restart. So I guess the problem come from slack_dbs, but looking to the documentation. I don't find anything about him. I have updated all my configurations removing the slack_dbs channel, and everything run fine now. Having some mention about that in documentation, could be a great help. @nickva thank you for your help, issue closed. -- 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
[GitHub] [couchdb] tophe closed issue #4378: v3.3.1 compaction smoosh config
tophe closed issue #4378: v3.3.1 compaction smoosh config URL: https://github.com/apache/couchdb/issues/4378 -- 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
[GitHub] [couchdb] pgj opened a new pull request, #4379: docs(mango): match description of `$mod` with reality
pgj opened a new pull request, #4379: URL: https://github.com/apache/couchdb/pull/4379 The remainder argument for the `$mod` operator can be zero, while its documentation suggests otherwise. It actually covers a very realistic use case where divisibility is expressed. [Neither related restrictions could be identified in the sources](https://github.com/apache/couchdb/blob/adf17140e81d0b74f2b2ecdea48fc4f702832eaf/src/mango/src/mango_selector.erl#L512:L513) [nor MongoDB forbids this](https://www.mongodb.com/docs/manual/reference/operator/query/mod/). Tests also seem to exercise [this specific case](https://github.com/apache/couchdb/blob/0059b8f90e58e10b199a4b768a06a762d12a30d3/src/mango/test/03-operator-test.py#L58). Thanks @iilyak for checking on these. Tasks: - [ ] Backport to all 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
[GitHub] [couchdb-helm] yekibud commented on a diff in pull request #105: Support existing persistent volume
yekibud commented on code in PR #105: URL: https://github.com/apache/couchdb-helm/pull/105#discussion_r1071513684 ## couchdb/templates/persistentvolumeclaim.yaml: ## @@ -0,0 +1,29 @@ +{{- if and .Values.persistentVolume.enabled .Values.persistentVolume.existing -}} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.persistentVolume.claimName }} + labels: +app: {{ template "couchdb.name" . }} +release: {{ .Release.Name }} + {{- with .Values.persistentVolume.annotations }} + annotations: +{{- toYaml . | nindent 10 }} Review Comment: Good catch, thanks. Moved these repeated sections to a couple helper functions. -- 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
[GitHub] [couchdb] nickva commented on issue #4378: v3.3.1 compaction smoosh config
nickva commented on issue #4378: URL: https://github.com/apache/couchdb/issues/4378#issuecomment-1384308086 @tophe the reason is likely because of how the default channels were disabled by removing them from the config. As of 3.3 those channel are always present (to allow adding new default system channel to the list). If you don't want the them to be active, you may set their `concurrency` to 0 as a better way to disable them. But removing from the config list doesn't work a disabling mechanism any longer. So you could try doing: ``` [smoosh.$channel] concurrency = 0 ... ``` Where `$channel` could be one of `upgrade_dbs, ratio_dbs,slack_dbs, upgrade_views, ratio_views, slack_views, index_cleanup` + other custom channels you may have. Another reason, I which may affect you is the change in the size calculation. Previously the document bodies which would have been deleted during compaction would have counted for the active size calculation. That is no longer the case. See the commit https://github.com/apache/couchdb/pull/4264 for more details. You may have to adjust your ratio value if it was previously set too low accounting for how the active size was erroneously inflated. -- 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