Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3108

namespace too long for temporary collections in Map Reduce



    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.9.1
    • MapReduce
    • None
    • ALL



      When I run mapreduce with output type merge on a collection, it
      creates temporary collection named as a concatenation of the source
      collection and result collection i.e. heres a line in teh verbose
      server output showing the temp collection being removed

      Wed May 11 20:31:23 [conn7] CMD: drop Events.tmp.mr.battlefield-

      (my source collection name is: battlefield-assault-pc.login
      the output collection name: battlefield-assault-pc.login.region)

      Would it be possible to either increase the max namespace length, or
      to modify the temporary named tables to something less verbose? (since
      I read we only have max ~128 chars in a namespace to work with, this
      would mean we really only have less than half of that if we intend to
      use mapreduce)
      Also the postfix "_0" is an ever increasing index showing the version
      of the merge. Since I run this mapreduce every 3 minutes it will
      eventually consume more and more characters as well.. may want to
      represent this as hex value instead?

      I've renamed my collections to the above so with the concated temp
      collections only using about 80 chars, however the problem now is when
      deleting the temporary collection it asserts when trying to drop one
      of its longer indices (gives the following error):

      Wed May 11 20:31:23 [conn7] dropCollection: Events.tmp.mr.battlefield-
      Wed May 11 20:31:23 [conn7] d->nIndexes was 3
      Assertion: 10348:$extra: ns name too long

      The index giving me trouble is:
      "name" : "id.time_1id.region_1_id.countryCode_1",
      "ns" : "Events.battlefield-assault-pc.login.region",
      "key" :

      { "_id.time" : 1, "_id.region" : 1, "_id.countryCode" : 1 }

      "v" : 0

      I'm assuming the drop() is failing cause the concatenation of the ns
      and index name is greater than the ~128 character ns max length?

      here's my build info:
      Wed May 11 20:38:58 [initandlisten] MongoDB starting : pid=28845
      port=27017 dbpath=/data/db/ 64-bit
      Wed May 11 20:38:58 [initandlisten] db version v1.8.1, pdfile version
      Wed May 11 20:38:58 [initandlisten] git version:
      Wed May 11 20:38:58 [initandlisten] build sys info: Linux bs-
      linux64.10gen.cc #1 SMP Fri Nov 20 17:48:28
      EST 2009 x86_64 BOOST_LIB_VERSION=1_41




            antoine Antoine Girbal
            antoine Antoine Girbal
            0 Vote for this issue
            1 Start watching this issue