Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.1.0, 4.5.0
-
None
-
Untriaged
-
No
Description
As per Aliaksey Artamonau comments on CBSE-2489
Potential lock-up
The core of the problem is here: http://src.couchbase.org/source/xref/4.1.0/couchdb/src/mapreduce/mapreduce.erl#53. This Ref value is then used in mapreduce_nif to index the contexts: http://src.couchbase.org/source/xref/4.1.0/couchdb/src/mapreduce/mapreduce_nif.cc#529. The problem is that phash2 is in no way collision-resistant. For example, here are two references that hash to the same value:
Hash: 107046579
|
Colliding refs: #Ref<0.0.0.23609> #Ref<0.0.0.19771>
|
What this means is that there's a chance that some context will get lost and will not abide by the javascript execution timeout.
Attachments
For Gerrit Dashboard: MB-19377 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
63318,8 | MB-19377 Handle collisions in context hash map | master | couchdb | Status: MERGED | +2 | +1 |
63623,2 | [BP] MB-19377 Handle collisions in context hash map | sherlock | couchdb | Status: ABANDONED | 0 | +1 |
63926,5 | MB-19377 Use unordered_set instead of map | master | couchstore | Status: MERGED | +2 | +1 |