Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-14

Problems creating large number of documents

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • None
    • library
    • Security Level: Public
    • OSX 10.8.2
      Couchbase: 2.0.0 community edition (build-1976)
      Nodejs: v0.8.18 (install via homebrew)
      libcouchbase: 2.0.2 (installed via homebrew)
      couchbase node module: 0.0.11 (install via npm)

    Description

      I have been running some tests around performance and ran across a problem attempting to create a large amount of documents. I have broken this down to the simplest example I can think of (see below) and been unable to insert more then 300 documents at a time. I have been able to rewrite the below as a recursive call but this is not ideal. I accept that this might not be a realistic example but do think that this is something which should be able to be done.

      var driver = require('couchbase');

      var config =

      { hosts : [ "localhost:8091" ], bucket : "default" }

      ;

      driver.connect(config, function(err, couchbase) {
      console.log("connected");
      for(var i=0; i < 300; ++i){
      couchbase.set("new_"+i, "something", function(err, meta)

      { console.log(err); console.log("inserted"); }

      );
      }
      });

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            trond Trond Norbye
            balance.it David Mitchell
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty