Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

call to _replicate does not assure an update #4

Open
mandric opened this issue Jun 3, 2014 · 4 comments
Open

call to _replicate does not assure an update #4

mandric opened this issue Jun 3, 2014 · 4 comments

Comments

@mandric
Copy link
Member

mandric commented Jun 3, 2014

Depending on revisions of the database, the ddoc may or may not get updated. So garden-core command will return "update succeeded" yet the ddoc was not actually updated, it only confirms the _replicate command returned 200. This can particularly be an issue if you are switching between markets or update an ddoc manually via HTTP. The ddoc _rev property and replication algorithms need to be in sync between markets for a _replicate call to actually change something. I'm starting to think replication is not what we want to use to install apps/ddocs. We want to do a brute force install by taking a ddoc from a market or one location and then overwriting another ddoc (use existing _rev) in a new location, not a conventional replication? @ryanramage @garethbowen @browndav thoughts?

It would also be nice to have an option to upload a ddoc.json file so an update or install can happen without dashboard even having an internet connection.

@mandric
Copy link
Member Author

mandric commented Jun 3, 2014

Example payload used for _replicate:

{
  "source":"http://staging.dev.medicmobile.org/market_1/_db",
  "target":"kujua-lite",
  "create_target":true,
  "doc_ids":["kujua-lite"]
}

@garethbowen
Copy link

Yeah I think a brute force approach is good. The only downside is a larger download, but it's an infrequent action so this isn't a big issue.

@mandric
Copy link
Member Author

mandric commented Jun 21, 2014

@ryanramage What do you think about making the memory transfer method the default update/install method and replication the backup?

@mandric
Copy link
Member Author

mandric commented Jun 24, 2014

ping @ryanramage

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants