line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright 2015 - present MongoDB, Inc. |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
4
|
|
|
|
|
|
|
# you may not use this file except in compliance with the License. |
5
|
|
|
|
|
|
|
# You may obtain a copy of the License at |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0 |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
10
|
|
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
11
|
|
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12
|
|
|
|
|
|
|
# See the License for the specific language governing permissions and |
13
|
|
|
|
|
|
|
# limitations under the License. |
14
|
|
|
|
|
|
|
|
15
|
59
|
|
|
59
|
|
457
|
use strict; |
|
59
|
|
|
|
|
140
|
|
|
59
|
|
|
|
|
1852
|
|
16
|
59
|
|
|
59
|
|
368
|
use warnings; |
|
59
|
|
|
|
|
154
|
|
|
59
|
|
|
|
|
2145
|
|
17
|
|
|
|
|
|
|
package MongoDB::Op::_ParallelScan; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Encapsulate code path for parallelCollectionScan commands |
20
|
|
|
|
|
|
|
|
21
|
59
|
|
|
59
|
|
341
|
use version; |
|
59
|
|
|
|
|
156
|
|
|
59
|
|
|
|
|
366
|
|
22
|
|
|
|
|
|
|
our $VERSION = 'v2.2.1'; |
23
|
|
|
|
|
|
|
|
24
|
59
|
|
|
59
|
|
4498
|
use Moo; |
|
59
|
|
|
|
|
191
|
|
|
59
|
|
|
|
|
388
|
|
25
|
|
|
|
|
|
|
|
26
|
59
|
|
|
59
|
|
19183
|
use MongoDB::Op::_Command; |
|
59
|
|
|
|
|
180
|
|
|
59
|
|
|
|
|
1589
|
|
27
|
59
|
|
|
59
|
|
391
|
use MongoDB::Error; |
|
59
|
|
|
|
|
147
|
|
|
59
|
|
|
|
|
6873
|
|
28
|
|
|
|
|
|
|
|
29
|
59
|
|
|
|
|
482
|
use Types::Standard qw( |
30
|
|
|
|
|
|
|
HashRef |
31
|
|
|
|
|
|
|
Int |
32
|
59
|
|
|
59
|
|
455
|
); |
|
59
|
|
|
|
|
154
|
|
33
|
|
|
|
|
|
|
|
34
|
59
|
|
|
59
|
|
54511
|
use BSON::Types qw/bson_int64/; |
|
59
|
|
|
|
|
152
|
|
|
59
|
|
|
|
|
2927
|
|
35
|
|
|
|
|
|
|
|
36
|
59
|
|
|
59
|
|
364
|
use namespace::clean; |
|
59
|
|
|
|
|
146
|
|
|
59
|
|
|
|
|
415
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has num_cursors => ( |
39
|
|
|
|
|
|
|
is => 'ro', |
40
|
|
|
|
|
|
|
required => 1, |
41
|
|
|
|
|
|
|
isa => Int, |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
has options => ( |
45
|
|
|
|
|
|
|
is => 'ro', |
46
|
|
|
|
|
|
|
required => 1, |
47
|
|
|
|
|
|
|
isa => HashRef, |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
with $_ for qw( |
51
|
|
|
|
|
|
|
MongoDB::Role::_PrivateConstructor |
52
|
|
|
|
|
|
|
MongoDB::Role::_CollectionOp |
53
|
|
|
|
|
|
|
MongoDB::Role::_ReadOp |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub execute { |
57
|
0
|
|
|
0
|
0
|
|
my ( $self, $link, $topology ) = @_; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $command = [ |
60
|
|
|
|
|
|
|
parallelCollectionScan => $self->coll_name, |
61
|
|
|
|
|
|
|
numCursors => bson_int64($self->num_cursors), |
62
|
|
|
|
|
|
|
($link->supports_read_concern ? |
63
|
0
|
|
|
|
|
|
@{ $self->read_concern->as_args() } : () ), |
64
|
0
|
0
|
|
|
|
|
%{$self->options}, |
|
0
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
]; |
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
my $op = MongoDB::Op::_Command->_new( |
68
|
|
|
|
|
|
|
db_name => $self->db_name, |
69
|
|
|
|
|
|
|
query => $command, |
70
|
|
|
|
|
|
|
query_flags => {}, |
71
|
|
|
|
|
|
|
bson_codec => $self->bson_codec, |
72
|
|
|
|
|
|
|
read_preference => $self->read_preference, |
73
|
|
|
|
|
|
|
monitoring_callback => $self->monitoring_callback, |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
0
|
|
|
|
|
|
return $op->execute( $link, $topology ); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |