Query Protocol: reset comes after initialization, but before use #2216
Unanswered
sploders101
asked this question in
Q&A
Replies: 1 comment
-
Hey @sploders101 , sorry for the late reply here. Here's what As part of that same change request, whenever a Does this answer your question? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
The documentation for the query server protocol suggests that
["reset", {...}]
is supposed to reset the server and cause it to forget all previous input. Because of this, I have put all mutable state variables in a separate object so that they can be easily reset, including the design document registry. Unfortunately, upon installing this into CouchDB, I was getting errors that design documents were missing from the registry, and upon further investigation, found that CouchDB was inserting the design documents, deleting them, and then trying to run the functions in them.Steps to Reproduce
Unfortunately, I do not currently have permission to release the code for this. However, by setting
you should be able to see similar results. Some data has been omitted for the sake of brevity.
I have since removed the registry from the resettable state (hence no error in the console), but this does not seem like a good solution to me, as I would have to restart the database to remove a design document.
Expected Behaviour
I would expect the reset to come before the document is transferred, or after the function is run. Ex:
--or--
with the latter obviously needing the design document to be re-sent.
Your Environment
Additional context
It is possible that this is intended (since the default query server works fine), and the documentation needs changed instead, but I believe there should be a way to remove design documents from memory without restarting the server.
Beta Was this translation helpful? Give feedback.
All reactions