Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.0
-
Security Level: Public
-
None
Description
If a context is created with a syntactically invalid JavaScript function, not all previously allocated memory is released, due to the fact the context was never returned to Erlang.
This happens exclusively at design document validation when the design document is validated.
The following bash command exposes the leak:
for i in `seq 1 10000`; do
curl -s -H 'Content-Type: application/json' \
-X PUT 'http://localhost:9500/default/_design/badspatial2' \
-d '{ "spatial": { "view1": "function(doc, meta { emit(
, meta.id); }" } }'
done
Attachments
For Gerrit Dashboard: MB-7407 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
23260,3 | MB-7407 Fix memory leak on context creation failure | 2.0.1 | couchdb | Status: MERGED | +2 | +1 |