Giter Club home page Giter Club logo

garden-core's People

Contributors

mandric avatar ryanramage avatar

Watchers

 avatar  avatar

Forkers

openube

garden-core's Issues

call to _replicate does not assure an update

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.

document update conflict during fallback method

vm@toaster:/srv/settings/medic-core/nginx $ garden-core http://dev.medicmobile.org/market/_design/market/_rewrite/details/kujua-lite http://admin:password@localhost:5984/ test1
30% Installing App
40% Replication timeout
40% Falling back to memory transfer
{ [Error: conflict
Document update conflict.]
  error: 'conflict',
  reason: 'Document update conflict.',
  response: 
   { _readableState: 
      { highWaterMark: 16384,
        buffer: [],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: false,
        ended: true,
        endEmitted: true,
        reading: false,
        calledRead: true,
        sync: false,
        needReadable: true,
        emittedReadable: false,
        readableListening: false,
        objectMode: false,
        defaultEncoding: 'utf8',
        ranOut: false,
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null },
     readable: false,
     domain: null,
     _events: { end: [Object], data: [Function], readable: [Function] },
     _maxListeners: 10,
     socket: 
      { _connecting: false,
        _handle: [Object],
        _readableState: [Object],
        readable: true,
        domain: null,
        _events: [Object],
        _maxListeners: 10,
        _writableState: [Object],
        writable: true,
        allowHalfOpen: false,
        onend: null,
        destroyed: false,
        errorEmitted: false,
        bytesRead: 247,
        _bytesDispatched: 10222021,
        _pendingData: null,
        _pendingEncoding: '',
        parser: null,
        _httpMessage: [Object],
        ondata: null },
     connection: 
      { _connecting: false,
        _handle: [Object],
        _readableState: [Object],
        readable: true,
        domain: null,
        _events: [Object],
        _maxListeners: 10,
        _writableState: [Object],
        writable: true,
        allowHalfOpen: false,
        onend: null,
        destroyed: false,
        errorEmitted: false,
        bytesRead: 247,
        _bytesDispatched: 10222021,
        _pendingData: null,
        _pendingEncoding: '',
        parser: null,
        _httpMessage: [Object],
        ondata: null },
     httpVersion: '1.1',
     complete: true,
     headers: 
      { server: 'CouchDB/1.4.0 (Erlang OTP/R15B03)',
        date: 'Thu, 13 Feb 2014 00:29:04 GMT',
        'content-type': 'application/json',
        'content-length': '58',
        'cache-control': 'must-revalidate' },
     trailers: {},
     _pendings: [],
     _pendingIndex: 0,
     url: '',
     method: null,
     statusCode: 409,
     client: 
      { _connecting: false,
        _handle: [Object],
        _readableState: [Object],
        readable: true,
        domain: null,
        _events: [Object],
        _maxListeners: 10,
        _writableState: [Object],
        writable: true,
        allowHalfOpen: false,
        onend: null,
        destroyed: false,
        errorEmitted: false,
        bytesRead: 247,
        _bytesDispatched: 10222021,
        _pendingData: null,
        _pendingEncoding: '',
        parser: null,
        _httpMessage: [Object],
        ondata: null },
     _consuming: true,
     _dumped: false,
     httpVersionMajor: 1,
     httpVersionMinor: 1,
     upgrade: false,
     req: 
      { domain: null,
        _events: [Object],
        _maxListeners: 10,
        output: [],
        outputEncodings: [],
        writable: true,
        _last: false,
        chunkedEncoding: false,
        shouldKeepAlive: true,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _hangupClose: false,
        socket: [Object],
        connection: [Object],
        agent: [Object],
        socketPath: undefined,
        method: 'PUT',
        path: '//test1/kujua-lite',
        _headers: [Object],
        _headerNames: [Object],
        _header: 'PUT //test1/kujua-lite HTTP/1.1\r\nHost: localhost\r\nAccept: application/json\r\nContent-Type: application/json\r\nContent-Length: 10221818\r\nAuthorization: Basic YWRtaW46MTIzcXdlISQ=\r\nConnection: keep-alive\r\n\r\n',
        _headerSent: true,
        parser: null,
        res: [Circular] },
     pipe: [Function],
     addListener: [Function],
     on: [Function],
     pause: [Function],
     resume: [Function],
     read: [Function] } }
vm@toaster:/srv/settings/medic-core/nginx $ 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.