From dev-return-49401-archive-asf-public=cust-asf.ponee.io@couchdb.apache.org Tue May 26 19:03:29 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3A3C2180608 for ; Tue, 26 May 2020 21:03:29 +0200 (CEST) Received: (qmail 88617 invoked by uid 500); 26 May 2020 19:03:28 -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 88605 invoked by uid 99); 26 May 2020 19:03:28 -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; Tue, 26 May 2020 19:03:28 +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 930051A420D for ; Tue, 26 May 2020 19:03:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.299 X-Spam-Level: X-Spam-Status: No, score=0.299 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id n-lZlvWUp3-J for ; Tue, 26 May 2020 19:03:26 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.193; helo=mail-vk1-f193.google.com; envelope-from=vatamane@gmail.com; receiver= Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 2A021BB8CA for ; Tue, 26 May 2020 19:03:26 +0000 (UTC) Received: by mail-vk1-f193.google.com with SMTP id m18so5288058vkk.9 for ; Tue, 26 May 2020 12:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=5CdDwjp0VrAGw+b2gujiMKVZ+0G1ExWm9aG70/vRCdw=; b=CnsgokJBna4rSWT3rQ3vl/tPFM1rERJFsN/QtzMB4M0cBAKBUvRYNCS2X2OSqUjumG e2OdUweOO56Jk0wXD8jvoS/bQLP6fcfSkTcwqcuXbKNYKGwtreW3NJ9V4ZxX4KJok2Ay mSKMw3cu1Gp+PHKaWG2IS7tKQqZf/rniPie2VCvjG2x/4jy5uTd8Ih7VPbr4bhZPDSSf wjsYFKRNjFNGuYbHf5x9IL2FBbYzg584V2pWD7kc+LwceA1WZGa8igug1Ljye9IS/5bC EUg4ISFtfvTjDYAZCT1Ozo3NcOzoK3t9fL9vIy+NS68v7MIRUhvSd12dhiJ4R6+l/naE FyVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=5CdDwjp0VrAGw+b2gujiMKVZ+0G1ExWm9aG70/vRCdw=; b=KcegrYoD42Bm1EGkhYRDHsuQEmMS4I9J0akpWiqDVpqGIw9b+czDPTDUEi+Vb4ihBP kJ9hbJdN6qy6b/9Ce7YzabtDIEKp+uYbSpLvJXMsrSK5rG6tNL9wt6BNrg6s7C243dNA Vids8RTVVBuuTAkyvhu22e1y0m6zRPNMJGX/8OWwB8W2q6v4yri98eG2evcJw5Kq2hjd /ZiQgInkHjEAYgv3uJK5QXAVjNxI4b+BWAPiK3yHCM/LSry73Zj+uyX4RliYE5LrfZqa feVplIa7Y5egxHQEPB0DZ5NgTWdX5QXYiOMQva8nBHuAm4HKnkQUdJSgPTMs7Wbjgbis 5KDA== X-Gm-Message-State: AOAM533+7EL+HE3Yaba+qm41lZ4qYY1oNi9OOH7LoirzGLco6s8BaAbu e2jQ0hkCml569FU9/N+HLMhzL9LfDKa0f4TQknyUow== X-Google-Smtp-Source: ABdhPJzI5dNGH2iZFNoy7I7P2RH1f7c9TPEUNpZxzBSUpjtUf3Id4Kbi+IAZqZLxTy0CG4EyDa4Ax5nTqGSE/gIVXoU= X-Received: by 2002:ac5:cbf6:: with SMTP id i22mr2314383vkn.68.1590519799669; Tue, 26 May 2020 12:03:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Vatamaniuc Date: Tue, 26 May 2020 15:03:08 -0400 Message-ID: Subject: Re: [DISCUSSION] Emit an instance ID value in DB info API response in CouchDB 4.0 To: dev@couchdb.apache.org Content-Type: text/plain; charset="UTF-8" Agree, "uuid" is a better name. On Tue, May 26, 2020 at 2:38 PM Paul Davis wrote: > > We already have the uuid generated. I'd suggest just adding a `uuid` > field that exposes it. > > On Tue, May 26, 2020 at 1:27 PM Nick Vatamaniuc wrote: > > > > Hi everyone, > > > > I was wondering if we could expose an "instance_id" field in the top > > level `/` (db_info) result. The value would be a uuid which is > > unique for every database instance. That is, if a database is deleted > > and re-created with the same name, it would have a different > > "instance_id". [*] > > > > We'd get at least 2 benefits from it: > > > > 1) Replicator could eventually could be updated to checkpoint on the > > target only, and thus have a read-only access to the source. Currently > > we need to checkpoint on the source to account for the case when the > > source db has been recreated, so we maintain the checkpoint history on > > the source and the target. > > > > 2) User's code might want to know if it the database has been > > recreated, mostly to avoid mishaps when they continue performing > > requests against the db with the same, which now may have completely > > different data in it. > > > > What do we think, do we like this idea? > > > > Cheers, > > -Nick > > > > [*] Back in 1.x we had the "instance_start_time" field which does > > mostly same thing, but is based on time. In 2.x and 3.x we still emit > > that field and for compatibility and hard code it to "0". We could > > re-use that field, but I think since the idea is to make it a uuid and > > not a timestamp so it's name doesn't quite match and it would have a > > different format (64bits vs 128bits).