pdrake reported in IRC that mongo version that comes with ubuntu 10.04 doesn't support mongodb_next_id need to put hook_requirements in to require mongo server version hight than 1.3

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

Rok Žlender’s picture

Quick code that does what we need putting it here so I don't lose it

$connection = new Mongo('mongodb://localhost');
$db = $con->selectDB('drupal');
$return = $db->execute('db.version();');
$version = $return['retval'];
version_compare($version, '1.3');
Rok Žlender’s picture

Assigned: Unassigned » Rok Žlender
Status: Needs work » Needs review
FileSize
2.03 KB
None View

I think attached patch should do the job.

Rok Žlender’s picture

FileSize
2.03 KB
None View

Patch above has some whitespace problems.

fgm’s picture

Issue summary: View changes
Status: Needs review » Needs work
FileSize
2.26 KB

Rerolled on today's HEAD.

Patch still works ; however, I think it would be better to rely on the standard connection handling sequence in mongodb() than roll up a new specific sequence as done here. It would be shorter and more reliably updated.

fgm’s picture

Status: Needs work » Needs review
FileSize
3.55 KB

How about this one ?

fgm’s picture

FileSize
2.72 KB

Missing patch itself

slashrsm’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

  • fgm committed 0dbad7b on 7.x-1.x
    Issue #1808114 by fgm, Rok Žlender: Require mongo server version higher...
fgm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-1.x. Thanks !

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.