You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investigating #180, I came across some undocumented behavior in the legacy mongo extension that enforces a primary read preference in php_mongo_runcommand(). The php_mongo_command_supports_rp() helper only respects the MongoDB instance's read preference for teh following commands:
count
group
dbStats
geoNear
distinct
aggregate
collStats
geoSearch
mapreduce and mapReduce (case-sensitive reasons)
parallelCollectionScan
Note that aggregate does not check for write variations that would output to a collection; however, mapReduce does check for { out: { inline: 1}}. For that reason, a fix for Doctrine MongoDB may not be warranted, since its query builder does not support aggregate. It's possible that it may require a fix for the aggregation builder, though.
The text was updated successfully, but these errors were encountered:
While investigating #180, I came across some undocumented behavior in the legacy
mongo
extension that enforces a primary read preference inphp_mongo_runcommand()
. Thephp_mongo_command_supports_rp()
helper only respects the MongoDB instance's read preference for teh following commands:count
group
dbStats
geoNear
distinct
aggregate
collStats
geoSearch
mapreduce
andmapReduce
(case-sensitive reasons)parallelCollectionScan
Note that
aggregate
does not check for write variations that would output to a collection; however,mapReduce
does check for{ out: { inline: 1}}
. For that reason, a fix for Doctrine MongoDB may not be warranted, since its query builder does not support aggregate. It's possible that it may require a fix for the aggregation builder, though.The text was updated successfully, but these errors were encountered: