couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woh...@apache.org
Subject [couchdb] branch master updated: Make map functions distinct with each invocation
Date Wed, 05 Jul 2017 20:51:42 GMT
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 858088e  Make map functions distinct with each invocation
858088e is described below

commit 858088e3838207f37b33a1ca5c76b21e62e2b7dc
Author: sebastianro <sebastianro@apache.org>
AuthorDate: Wed Jul 5 22:01:03 2017 +0200

    Make map functions distinct with each invocation
---
 test/javascript/couch.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/javascript/couch.js b/test/javascript/couch.js
index c7b8d95..6ff3005 100644
--- a/test/javascript/couch.js
+++ b/test/javascript/couch.js
@@ -147,6 +147,9 @@ function CouchDB(name, httpHeaders, globalRequestOptions) {
     if (typeof(mapFun) != "string") {
       mapFun = mapFun.toSource ? mapFun.toSource() : "(" + mapFun.toString() + ")";
     }
+    if ((!language) || language.toLowerCase() == "javascript") {
+      mapFun = mapFun + "/" + "* avoid race cond " + (new Date().getTime()) + " *" + "/";
+    }
     body.map = mapFun;
     if (reduceFun != null) {
       if (typeof(reduceFun) != "string") {

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message