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

Files: 

Comments

Rok Žlender’s picture

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

<?php
$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
StatusFileSize
new2.03 KB
Test request sent.
[ View ]

I think attached patch should do the job.

Rok Žlender’s picture

StatusFileSize
new2.03 KB
Test request sent.
[ View ]

Patch above has some whitespace problems.

fgm’s picture

Issue summary:View changes
Status:Needs review» Needs work
StatusFileSize
new2.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
StatusFileSize
new3.55 KB

How about this one ?

fgm’s picture

StatusFileSize
new2.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 !