You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "pgj (via GitHub)" <gi...@apache.org> on 2023/05/11 16:25:49 UTC

[GitHub] [couchdb] pgj commented on a diff in pull request #4594: fix(`mango`): covering indexes crash on partitioned databases

pgj commented on code in PR #4594:
URL: https://github.com/apache/couchdb/pull/4594#discussion_r1191427830


##########
src/mango/test/user_docs.py:
##########
@@ -58,9 +60,18 @@ def setup_users(db, **kwargs):
     db.save_docs(copy.deepcopy(USERS_DOCS))
 
 
-def setup(db, index_type="view", **kwargs):
+def setup(db, index_type="view", partitioned=False, **kwargs):
     db.recreate()
-    db.save_docs(copy.deepcopy(DOCS))
+    p = str(partitioned).lower()
+    docs = copy.deepcopy(DOCS)
+
+    if partitioned:
+        for index, doc in zip(itertools.count(), docs):

Review Comment:
   Yes, thanks for the suggestion.  That is even shorter.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org