Skip to content

Commit ae1a95a

Browse files
committed
Aggregate can be sent to mongos
1 parent ef879a5 commit ae1a95a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo/operation/aggregate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Aggregate
6262
#
6363
# @since 2.0.0
6464
def execute(context)
65-
unless context.standalone? || context.primary? || secondary_ok?
65+
unless context.standalone? || context.mongos? || context.primary? || secondary_ok?
6666
raise Error::NeedPrimaryServer.new(ERROR_MESSAGE)
6767
end
6868
execute_message(context)

0 commit comments

Comments
 (0)