[ 
https://issues.apache.org/jira/browse/COUCHDB-1654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572885#comment-13572885
 ] 

ASF subversion and git services commented on COUCHDB-1654:
----------------------------------------------------------

Commit 73195d31fcf192a4d821b0d751a4775f65753632 in branch refs/heads/1.3.x from 
[~janl]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb.git;h=73195d3 ]

COUCHDB-1654: Transparently update view signatures from <= 1.2.x.

Updates 1.2.x or earlier view files to 1.3.x or later view files
transparently, the first time the 1.2.x view file is opened by
1.3.x or later.

Here's how it works:

Before opening a view index,
If no matching index file is found in the new location:
 calculate the <= 1.2.x view signature
 if a file with that signature lives in the old location
   copy it to the new location with the new signature in the name.
Then proceed to open the view index as usual.
After opening, read its header.

If the header matches the <= 1.2.x style #index_header record:
  upgrade the header to the new #mrheader record
The next time the view is used, the new header is used.

If we crash after the rename, but before the header upgrade,
  the header upgrade is done on the next view opening.

If we crash between upgrading to the new header and writing
  that header to disk, we start with the old header again,
  do the upgrade and write to disk.

Includes etap tests in 250*.t.

                
> couchdb view sig changed
> ------------------------
>
>                 Key: COUCHDB-1654
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1654
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>            Reporter: Robert Newson
>            Priority: Blocker
>             Fix For: 1.3
>
>
> view sigs and location changed between 1.2.x and 1.3.x, which would cause 
> full rebuilds.
> to be clear: upgrading to 1.3 should not cause a view to rebuild from scratch.
> ➜  couchdb git:(1.3.x) find tmp
> tmp
> tmp/lib
> tmp/lib/.db1_design
> tmp/lib/.db1_design/0761939631be54bf36d3ed9172bcf689.view
> tmp/lib/.delete
> tmp/lib/_replicator.couch
> tmp/lib/_users.couch
> tmp/lib/db1.couch
> tmp/log
> tmp/log/couch.log
> tmp/run
> tmp/run/couch.uri
> tmp/run/couchdb
> ➜  couchdb git:(1.3.x) find tmp
> tmp
> tmp/lib
> tmp/lib/.db1_design
> tmp/lib/.db1_design/0761939631be54bf36d3ed9172bcf689.view
> tmp/lib/.db1_design/mrview
> tmp/lib/.db1_design/mrview/641ce136c0f1dbe93aa94d3a419a0efe.view
> tmp/lib/.delete
> tmp/lib/_replicator.couch
> tmp/lib/_users.couch
> tmp/lib/db1.couch
> tmp/log
> tmp/log/couch.log
> tmp/run
> tmp/run/couch.uri
> tmp/run/couchdb

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to