Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1707318B4E for ; Mon, 14 Mar 2016 15:22:14 +0000 (UTC) Received: (qmail 9097 invoked by uid 500); 14 Mar 2016 15:22:13 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 9036 invoked by uid 500); 14 Mar 2016 15:22:13 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 9024 invoked by uid 99); 14 Mar 2016 15:22:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2016 15:22:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id CB32A1A14D6 for ; Mon, 14 Mar 2016 15:22:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=arandomurl-com.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 8Qd0LgcWHBSl for ; Mon, 14 Mar 2016 15:22:10 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id C5E525F1C2 for ; Mon, 14 Mar 2016 15:22:09 +0000 (UTC) Received: by mail-vk0-f54.google.com with SMTP id c3so212547870vkb.3 for ; Mon, 14 Mar 2016 08:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arandomurl-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=ix8zjHyeYu0uxOzZ3KWPDGpkU4uHfpPmQDTAKMt4Mvk=; b=zWwRjHOJ7/JdBptosCJZEZrDtezNnXYgDghe0R2nQYmqh4cJbNF1W2M+75wsZu9ZKu 8mqlB9gf2/7bZE8+dSvVYpTmIpS/JsDThK6bK19BOksMoOfa4gvmCFrgGY3ovk6wn4eC afm79Xf+n0iHqQq+DY9VaEJDwvp4g06aoUX4kDQdcIm67zvfrvyazctDavuRBBB7UqpO 4nnxOn8YDpMeylJNp38bIrefRJpMO+Lix33yDDxKvLC2y7B2993huaxdUqFGFcfYXQIZ VvQExR67+k3FRISIw6SVggFAx1nliVzIXJo8KDZAP+p7yRdy4Ca79RmTfOSpvuGZkhWV issg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=ix8zjHyeYu0uxOzZ3KWPDGpkU4uHfpPmQDTAKMt4Mvk=; b=nBCXlW2F8WX27vIhrfI8aDgBPhnrjy1hJysHsYFD8xDDFTqQmcgm6kDgrQVureYEi+ E5QbDx6kNtz659gIPsm1TybYarH2eD1ujoL+tJL7GVwNWBK/oZITNaOQ62Bq4gn48sNe wdio9wltqnIcFKPpGHFYjJvZ9P+EBfV9u0oE+WPdBPgyXytK2JZYLsbSR5Dw3eiLnjnl c3TBgp8eYb0BmC2XrGi+K65R7HXvqFpkALcKBAVqAdUaaSbHz+eQimXufUlC1f5XjP9a fjVv3+ezamQL1LMx4IjJo/AH+bqbtslX5DxVv/Phqiq4OehwMVQe5Ss0eB29uB0PMEer 5dIQ== X-Gm-Message-State: AD7BkJJMO2rjtJ3W4dE5qXuxVEyOtSVEqy5tKxNTDmrL+m5NYuSK+9vrkl1sa3gDUbL99Pak0XxFBJOZvZrUOg== MIME-Version: 1.0 X-Received: by 10.31.168.76 with SMTP id r73mr25388517vke.117.1457968922720; Mon, 14 Mar 2016 08:22:02 -0700 (PDT) Received: by 10.31.47.140 with HTTP; Mon, 14 Mar 2016 08:22:02 -0700 (PDT) In-Reply-To: References: Date: Mon, 14 Mar 2016 15:22:02 +0000 Message-ID: Subject: Re: db/_all_conflicts From: Dale Harvey To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=001a11415bc0bb953a052e03d798 --001a11415bc0bb953a052e03d798 Content-Type: text/plain; charset=UTF-8 I would really like to give users better abilities to handle conflict resolution, I am however extremely worried about considering to introduce another API endpoint. We have like 6/7 read API's each of them having their own idiosyncrasies and its extremely confusing for users to know which to use when. If we could extend our existing APIs to cater for this use case it seems hugely preferable, ie something like mango / pouchdb find db.find({ selector: { _conflicts: {'$exists`: true} } }).then(function (result) { ... }); On 14 March 2016 at 14:07, Sebastian Rothbucher < sebastianrothbucher@googlemail.com> wrote: > Hi Robert, > > this looks awesome already! I don't want to be the spoiler in this, but > wouldn't conflicts occur recently, e.g. using _changes (descending) might > do the trick of limit-ing? (Still you'd discard docs that simply don't have > conflicts, but probably way not that many) > > If that doesn't do the trick: just forget what I just said ;-) > > Best > Sebastian > > On Mon, Mar 14, 2016 at 2:58 PM, Robert Kowalski wrote: > > > Hi folks, > > > > it is hackweek for the Fauxton team and I am lucky enough to be able > > to work on whatever I want :) > > > > Conflicts are an integral part of CouchDB. Right now I dream of making > > conflict-resolution a first class citizen in Couch. Conflict > > resolution requires a lot of manual steps. The idea is to give the > > user all the tools they need to easily solve conflicts, and also to > > help them to avoid conflicts in the future. > > > > To empower every user to detect and solve conflicts easily on their > > own, instead of writing some custom bash/js scripts and custom view > > hackery I would like to have a list of conflicts in Fauxton for every > > database. > > > > The list, provided by Couch, shows which documents have conflicts. I > > can then click on the conflicting doc and get a nice diffing editor > > which helps me to solve the conflict. Here's an early draft: [1] > > > > Discussing the matter in couchdb-dev we thought about serverside > > filtering of _all_docs - which is a problem for large databases. > > > > Another option is a new endpoint, e.g. /db/_all_conflicts. Behind this > > endpoint is an index which is listing the conflicting documents. > > > > Jan and Alex suggested the index could be opt-in. They suggested an > > "auto-warmer" - it would update the index every 1000 doc updates or > > so. This way not every doc write would get slower. In later iteration > > we could even expose the "auto-warming" feature to other views. > > > > Do you want to join me on my quest to provide the best conflict > > resolution tools and education? > > What do you think about it? > > > > Best, > > Robert :) > > > > [1] > > > https://cloud.githubusercontent.com/assets/298166/13741539/c4ecf6d0-e9ce-11e5-84c5-502b0989c290.png > > > --001a11415bc0bb953a052e03d798--