Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit cf19d12

Browse files
committed
PERL-790 remove session support from parallel_scan
The server currently has a bug with parallel_scan and sessions under authentication. Until resolved, parallel_scan won't support sessions.
1 parent 220f799 commit cf19d12

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

devel/t-dynamic/PERL-790-driver-sessions.t

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,6 @@ sub test_collection_session_exceptions {
419419
$error_regex,
420420
sprintf( $message_string, 'distinct' );
421421

422-
like
423-
exception { $coll->parallel_scan(
424-
10,
425-
{ session => $session } ) },
426-
$error_regex,
427-
sprintf( $message_string, 'parallel_scan' );
428-
429422
like
430423
exception { $coll->rename(
431424
"another_collection_name",

lib/MongoDB/Collection.pm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,6 @@ A hash reference of options may be provided. Valid keys include:
13521352
=for :list
13531353
* C<maxTimeMS> – the maximum amount of time in milliseconds to allow the
13541354
command to run. (Note, this will be ignored for servers before version 3.4.)
1355-
* C<session> - the session to use for these operations. If not supplied, will
1356-
use an implicit session. For more information see L<MongoDB::ClientSession>
13571355
13581356
=cut
13591357

@@ -1366,14 +1364,12 @@ sub parallel_scan {
13661364
}
13671365
$options = ref $options eq 'HASH' ? $options : { };
13681366

1369-
my $session = $self->_get_session_from_hashref( $options );
1370-
13711367
# TODO Implicit sessions expire when???
13721368
my $op = MongoDB::Op::_ParallelScan->_new(
13731369
%{ $self->_op_args },
13741370
num_cursors => $num_cursors,
13751371
options => $options,
1376-
session => $session,
1372+
session => undef, # SERVER-33998 not fully supported
13771373
);
13781374

13791375
my $result = $self->client->send_read_op( $op );

0 commit comments

Comments
 (0)