Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
0dcdfbaf
Unverified
Commit
0dcdfbaf
authored
Aug 14, 2019
by
Andreas Braun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHPLIB-463: Make listCollections, listDatabases, and listIndexes operations retryable
parent
64e249af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
ListCollections.php
src/Operation/ListCollections.php
+1
-1
ListDatabases.php
src/Operation/ListDatabases.php
+1
-1
ListIndexes.php
src/Operation/ListIndexes.php
+1
-1
No files found.
src/Operation/ListCollections.php
View file @
0dcdfbaf
...
@@ -130,7 +130,7 @@ class ListCollections implements Executable
...
@@ -130,7 +130,7 @@ class ListCollections implements Executable
$cmd
[
'maxTimeMS'
]
=
$this
->
options
[
'maxTimeMS'
];
$cmd
[
'maxTimeMS'
]
=
$this
->
options
[
'maxTimeMS'
];
}
}
$cursor
=
$server
->
executeCommand
(
$this
->
databaseName
,
new
Command
(
$cmd
),
$this
->
createOptions
());
$cursor
=
$server
->
execute
Read
Command
(
$this
->
databaseName
,
new
Command
(
$cmd
),
$this
->
createOptions
());
$cursor
->
setTypeMap
([
'root'
=>
'array'
,
'document'
=>
'array'
]);
$cursor
->
setTypeMap
([
'root'
=>
'array'
,
'document'
=>
'array'
]);
return
new
CollectionInfoCommandIterator
(
new
CachingIterator
(
$cursor
));
return
new
CollectionInfoCommandIterator
(
new
CachingIterator
(
$cursor
));
...
...
src/Operation/ListDatabases.php
View file @
0dcdfbaf
...
@@ -98,7 +98,7 @@ class ListDatabases implements Executable
...
@@ -98,7 +98,7 @@ class ListDatabases implements Executable
$cmd
[
'maxTimeMS'
]
=
$this
->
options
[
'maxTimeMS'
];
$cmd
[
'maxTimeMS'
]
=
$this
->
options
[
'maxTimeMS'
];
}
}
$cursor
=
$server
->
executeCommand
(
'admin'
,
new
Command
(
$cmd
),
$this
->
createOptions
());
$cursor
=
$server
->
execute
Read
Command
(
'admin'
,
new
Command
(
$cmd
),
$this
->
createOptions
());
$cursor
->
setTypeMap
([
'root'
=>
'array'
,
'document'
=>
'array'
]);
$cursor
->
setTypeMap
([
'root'
=>
'array'
,
'document'
=>
'array'
]);
$result
=
current
(
$cursor
->
toArray
());
$result
=
current
(
$cursor
->
toArray
());
...
...
src/Operation/ListIndexes.php
View file @
0dcdfbaf
...
@@ -126,7 +126,7 @@ class ListIndexes implements Executable
...
@@ -126,7 +126,7 @@ class ListIndexes implements Executable
}
}
try
{
try
{
$cursor
=
$server
->
executeCommand
(
$this
->
databaseName
,
new
Command
(
$cmd
),
$this
->
createOptions
());
$cursor
=
$server
->
execute
Read
Command
(
$this
->
databaseName
,
new
Command
(
$cmd
),
$this
->
createOptions
());
}
catch
(
DriverRuntimeException
$e
)
{
}
catch
(
DriverRuntimeException
$e
)
{
/* The server may return an error if the collection does not exist.
/* The server may return an error if the collection does not exist.
* Check for possible error codes (see: SERVER-20463) and return an
* Check for possible error codes (see: SERVER-20463) and return an
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment