Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docIDs like "_design/..." cause 1.x upgrader to fail #714

Closed
vladoun opened this issue Mar 5, 2019 · 4 comments

Comments

@vladoun
Copy link

commented Mar 5, 2019

Database upgrade fails on error "Invalid docID" on document with ID "_design/normal_repl":

...
CouchbaseLite  Info: Importing doc '-HashTag_dc4ae24a-7199-40d0-8f1b-333bf0ef8fcc'
CouchbaseLite  Info:         ...rev 1-d8783062fbc960281877477cc078e1f8
CouchbaseLite  Info: Importing doc '-HashTag_e65c8672-36e1-49f7-b9ea-25824b1ef353'
CouchbaseLite  Info:         ...rev 1-2d1ad0f45bea32f6e42f1ccf98c12a0a
CouchbaseLite  Info: Importing doc '_design/normal_repl'
CouchbaseLite  Info:         ...rev 1-1bdd5c1739923e40cc26f3ad96798a63
Error upgrading database: Invalid docID "_design/normal_repl", converting doc "_design/normal_repl"

  • Version: 2.1.3 - upgrading from 1.4.1
  • Client OS: iOS
@snej

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

Ugh, must've forgotten about design documents when coding the validation.
The upgrader should probably just skip such documents; there's no use for them in CBL 2 anyway since it doesn't have views.

@snej snej transferred this issue from couchbase/couchbase-lite-ios Mar 5, 2019

@snej snej changed the title Database upgrading error "Invalid docID" (v1.4.1 -> 2.1.3) docIDs like "_design/..." cause 1.x upgrader to fail Mar 5, 2019

@biokys

This comment has been minimized.

Copy link

commented Mar 6, 2019

Hi,
We have exactly the same issue. Please fix it asap.

@snej

This comment has been minimized.

Copy link
Member

commented Mar 6, 2019

If you're a Couchbase customer, you can raise the issue through Support channels to expedite it.

@djpongh djpongh added this to the Iridium milestone Mar 6, 2019

@djpongh djpongh added the P1: high label Mar 6, 2019

snej added a commit that referenced this issue Mar 6, 2019

Upgrader: Skip “_design/…” docIDs
In 1.x (and CouchDB), this form of docID was allowed even though it
starts with a `_`. But 2.x doesn’t allow _any_ doc IDs that start
with `_`, so the Upgrader fails.
I added a check to detect and skip such docs. These weren’t “real”
docs anyway, they were used to store JavaScript map and reduce
functions, which are useless in 2.x anyway.

Fixes #714
@snej

This comment has been minimized.

Copy link
Member

commented Mar 6, 2019

We happen to be working on a quick-fix release already for other reasons, and the fix for this issue is trivial, so we'll fix it in the same release.

@djpongh djpongh added the ready label Mar 11, 2019

@pasin pasin closed this in ad39ed2 Mar 12, 2019

@pasin pasin removed the ready label Mar 12, 2019

pasin added a commit that referenced this issue Mar 12, 2019

Upgrader: Skip “_design/…” docIDs
In 1.x (and CouchDB), this form of docID was allowed even though it
starts with a `_`. But 2.x doesn’t allow _any_ doc IDs that start
with `_`, so the Upgrader fails.
I added a check to detect and skip such docs. These weren’t “real”
docs anyway, they were used to store JavaScript map and reduce
functions, which are useless in 2.x anyway.

Fixes #714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.