Download & Extend

Deprecated function: MongoBinData

Project:Mongodb
Version:7.x-1.0-rc2
Component:Cache
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Deprecated function: MongoBinData::__construct(): The default value for type will change to 0 in the future. Please pass in '2' explicitly. in DrupalMongoDBCache->set() (line 131 of ......../sites/all/modules/mongodb/mongodb_cache/mongodb_cache.inc).

I believe this doesnt seem to be much of an issue, but it does affect the performance a little as it keeps on flooding the watchdog with every request.

Comments

#1

Status:active» needs review

Note: this warning is new in version 1.2.11 of the extension.

Going further, I wonder whether there would not be more to gain from alway using a MongoBinData::BYTE_ARRAY instead of routing each string data through drupal_validate_utf8() as the check currently does.

This probably needs performance testing, but that would be a followup issue.

AttachmentSizeStatusTest resultOperations
0001-Issue-1786330-MongoBinData-__construct-needed-an-exp.patch975 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 11 pass(es), 6 fail(s), and 0 exception(s).View details | Re-test

#2

Status:needs review» needs work

The last submitted patch, 0001-Issue-1786330-MongoBinData-__construct-needed-an-exp.patch, failed testing.

#3

+1 flooding the watchdog on each cache operation is bad.

#4

Status:needs work» reviewed & tested by the community

Applied patch from #1 and it seems to be not flooding the logs anymore. Should consider this to be comitted :)

Thanks fgm!

#5

#6

Status:reviewed & tested by the community» needs work

The last submitted patch, 0001-Issue-1786330-MongoBinData-__construct-needed-an-exp.patch, failed testing.