Skip to content

Commit 97a51e1

Browse files
committed
RUBY-1028: Improve performance of cursor namespace injection
1 parent dabeec0 commit 97a51e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo/monitoring/event/command_succeeded.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def self.generate_reply(command_payload, reply_payload)
9898
if reply_payload
9999
reply = reply_payload[:reply]
100100
if cursor = reply[:cursor]
101-
reply = reply.merge(cursor: cursor.merge(ns: namespace(command_payload)))
101+
cursor.merge!('ns' => namespace(command_payload)) if !cursor.key?('ns')
102102
end
103103
reply
104104
else

0 commit comments

Comments
 (0)