Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3336

r parameter for mango find in a cluster

    XMLWordPrintableJSON

    Details

    • Type: Documentation
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      It's not clear in the official documentation how mango indexes and searches are managed in a cluster of couchdb. From my experience, when inserting documents and then querying a mango index just after, there is a risk than a document doesn't appear in the index.

      The official documentation (http://docs.couchdb.org/en/2.0.0/api/database/find.html) doesn't say anything about the r parameter. But I've found its existence in https://github.com/apache/couchdb-mango#find. As I understand, even with r=3, there is no guarantee than a document that has just been inserted will be in the index (but if it is in the index, it will be the last version of its JSON content that will be answered).

      By the way, _explain has a surprising behavior for r. It is display like "r": [50]. I suppose it is an Erlang list of chars (50 is the ascii for '2').

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              brmichel Bruno Michel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: