Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A49110CF0 for ; Wed, 10 Jul 2013 12:22:50 +0000 (UTC) Received: (qmail 40684 invoked by uid 500); 10 Jul 2013 12:22:49 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 40598 invoked by uid 500); 10 Jul 2013 12:22:47 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 40590 invoked by uid 99); 10 Jul 2013 12:22:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 12:22:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mslama@email.cz designates 77.75.72.26 as permitted sender) Received: from [77.75.72.26] (HELO mxh1.seznam.cz) (77.75.72.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 12:22:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=email.cz; s=beta; t=1373458939; bh=8XvOXp3jCj8zLQigrpgU511wcZSFcYXEsoOholfQ8GE=; h=Received:From:To:Subject:Date:Message-Id:References:Mime-Version: X-Mailer:Content-Type; b=ePIVv/ke9w/9sQ+W2M9hkvV5MrSt38HhuUDa67TD/reFyfinnIACS4rVfGTfL8n42 3+afPhHDdZHUr7+KPEsSfCJndS4zOkBnV1jh0ar+GueCpLWmC/KVOMbNx+pbUp6l7h UqRsRBmyn2/dZlyqv/TBURyx4TaEUPHitki8shGc= Received: from h151.cica.cz (h151.cica.cz [62.168.35.151]) by email.seznam.cz (szn-ebox-4.4.67) with HTTP; Wed, 10 Jul 2013 14:21:56 +0200 (CEST) From: "Marek Slama" To: Subject: RE: Remove unused version history Date: Wed, 10 Jul 2013 14:21:56 +0200 (CEST) Message-Id: References: <8nZ.aliJ.4{DW5SkopkN.1HsiIH@seznam.cz> <9C0FC4C8E9C29945B01766FC7F9D3898189DB39F6D@eurmbx01.eur.adobe.com> Mime-Version: 1.0 (szn-mime-1.0.91) X-Mailer: szn-ebox-4.4.67 Content-Type: multipart/alternative; boundary="=_450e67073f28ffde21a9c996=e914f05d-7b5d-503a-9d22-babcb4583d20_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_450e67073f28ffde21a9c996=e914f05d-7b5d-503a-9d22-babcb4583d20_= Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, ok I see. If version history has at least one regular version I will check if node with UUID jrc:versionableUuid exists. If it does not exist it is orphaned version history and I can remove it by removing versions from it (from version history). If version history has only root version there is now no way how to remove it till JCR-3238 is fixed. (root version frozen node actually does not contain any big data - we use nt:file nodes as versionable so I am mainly concerned about saving space). (Our old code was wrong - it created versionable nodes and deleted them right before next update without calling checkin. So it resulted exactly in second case.) Thanks Marek Hi, " removing the last regular version of a version history should remove the version history. See: https://issues.apache.org/jira/browse/JCR-134 however, there's a special case and an open issue, when only a root version exists for a versionable node. see: https://issues.apache.org/jira/browse/ JCR-3238 regards marcel > -----Original Message----- > From: Marek Slama [mailto:mslama@email.cz] > Sent: Montag, 8. Juli 2013 15:54 > To: users@jackrabbit.apache.org > Subject: Remove unused version history > > Hello, > > I want to ask if there is any way how to remove unused version history. My > (incorrect used case) > > 1.Add versionable node. > 2.Remove versionable node without removing version history. > > I know it is possible to remove version history when I get version history > first from node using: > versionHistory = versionManager.getVersionHistory(String absPath); > > But if it is omitted I can only find out unused version history nodes but as > they are protected it is not possible to > remove it. > > Thanks > > Marek" --=_450e67073f28ffde21a9c996=e914f05d-7b5d-503a-9d22-babcb4583d20_=--