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
c1dc92cc
Unverified
Commit
c1dc92cc
authored
Mar 02, 2020
by
Andreas Braun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHPLIB-532: Sync spec tests for transactions
parent
aec71367
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
799 additions
and
261 deletions
+799
-261
callback-retry.json
...SpecTests/transactions-convenient-api/callback-retry.json
+2
-1
commit-retry.json
...s/SpecTests/transactions-convenient-api/commit-retry.json
+3
-0
transaction-options.json
...ests/transactions-convenient-api/transaction-options.json
+10
-10
abort.json
tests/SpecTests/transactions/abort.json
+2
-1
bulk.json
tests/SpecTests/transactions/bulk.json
+4
-12
causal-consistency.json
tests/SpecTests/transactions/causal-consistency.json
+6
-15
error-labels.json
tests/SpecTests/transactions/error-labels.json
+32
-14
mongos-recovery-token.json
tests/SpecTests/transactions/mongos-recovery-token.json
+4
-1
pin-mongos.json
tests/SpecTests/transactions/pin-mongos.json
+2
-2
read-concern.json
tests/SpecTests/transactions/read-concern.json
+10
-10
retryable-abort-errorLabels.json
...s/SpecTests/transactions/retryable-abort-errorLabels.json
+204
-0
retryable-abort.json
tests/SpecTests/transactions/retryable-abort.json
+45
-0
retryable-commit-errorLabels.json
.../SpecTests/transactions/retryable-commit-errorLabels.json
+223
-0
retryable-commit.json
tests/SpecTests/transactions/retryable-commit.json
+56
-5
transaction-options-repl.json
tests/SpecTests/transactions/transaction-options-repl.json
+181
-0
transaction-options.json
tests/SpecTests/transactions/transaction-options.json
+11
-177
update.json
tests/SpecTests/transactions/update.json
+4
-12
write-concern.json
tests/SpecTests/transactions/write-concern.json
+0
-1
No files found.
tests/SpecTests/transactions-convenient-api/callback-retry.json
View file @
c1dc92cc
...
@@ -235,7 +235,8 @@
...
@@ -235,7 +235,8 @@
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"TransientTransactionError"
,
"TransientTransactionError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
]
],
"errorContains"
:
"E11000"
}
}
}
}
],
],
...
...
tests/SpecTests/transactions-convenient-api/commit-retry.json
View file @
c1dc92cc
...
@@ -304,6 +304,9 @@
...
@@ -304,6 +304,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
10107
,
"errorCode"
:
10107
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
...
tests/SpecTests/transactions-convenient-api/transaction-options.json
View file @
c1dc92cc
...
@@ -192,7 +192,7 @@
...
@@ -192,7 +192,7 @@
"session0"
:
{
"session0"
:
{
"defaultTransactionOptions"
:
{
"defaultTransactionOptions"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
1
"w"
:
1
...
@@ -243,7 +243,7 @@
...
@@ -243,7 +243,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
null
"writeConcern"
:
null
},
},
...
@@ -308,7 +308,7 @@
...
@@ -308,7 +308,7 @@
},
},
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
1
"w"
:
1
...
@@ -335,7 +335,7 @@
...
@@ -335,7 +335,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
null
"writeConcern"
:
null
},
},
...
@@ -380,7 +380,7 @@
...
@@ -380,7 +380,7 @@
"session0"
:
{
"session0"
:
{
"defaultTransactionOptions"
:
{
"defaultTransactionOptions"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
majority
"
"level"
:
"
snapshot
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
"majority"
"w"
:
"majority"
...
@@ -412,7 +412,7 @@
...
@@ -412,7 +412,7 @@
},
},
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
1
"w"
:
1
...
@@ -439,7 +439,7 @@
...
@@ -439,7 +439,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
null
"writeConcern"
:
null
},
},
...
@@ -481,7 +481,7 @@
...
@@ -481,7 +481,7 @@
"description"
:
"withTransaction explicit transaction options override client options"
,
"description"
:
"withTransaction explicit transaction options override client options"
,
"useMultipleMongoses"
:
true
,
"useMultipleMongoses"
:
true
,
"clientOptions"
:
{
"clientOptions"
:
{
"readConcernLevel"
:
"
majority
"
,
"readConcernLevel"
:
"
local
"
,
"w"
:
"majority"
"w"
:
"majority"
},
},
"operations"
:
[
"operations"
:
[
...
@@ -508,7 +508,7 @@
...
@@ -508,7 +508,7 @@
},
},
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
1
"w"
:
1
...
@@ -535,7 +535,7 @@
...
@@ -535,7 +535,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
null
"writeConcern"
:
null
},
},
...
...
tests/SpecTests/transactions/abort.json
View file @
c1dc92cc
...
@@ -458,7 +458,8 @@
...
@@ -458,7 +458,8 @@
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"TransientTransactionError"
,
"TransientTransactionError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
]
],
"errorContains"
:
"E11000"
}
}
},
},
{
{
...
...
tests/SpecTests/transactions/bulk.json
View file @
c1dc92cc
...
@@ -304,9 +304,7 @@
...
@@ -304,9 +304,7 @@
"$set"
:
{
"$set"
:
{
"x"
:
1
"x"
:
1
}
}
},
}
"multi"
:
false
,
"upsert"
:
false
},
},
{
{
"q"
:
{
"q"
:
{
...
@@ -317,7 +315,6 @@
...
@@ -317,7 +315,6 @@
"x"
:
2
"x"
:
2
}
}
},
},
"multi"
:
false
,
"upsert"
:
true
"upsert"
:
true
}
}
],
],
...
@@ -379,9 +376,7 @@
...
@@ -379,9 +376,7 @@
},
},
"u"
:
{
"u"
:
{
"y"
:
1
"y"
:
1
},
}
"multi"
:
false
,
"upsert"
:
false
},
},
{
{
"q"
:
{
"q"
:
{
...
@@ -389,9 +384,7 @@
...
@@ -389,9 +384,7 @@
},
},
"u"
:
{
"u"
:
{
"y"
:
2
"y"
:
2
},
}
"multi"
:
false
,
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
@@ -454,8 +447,7 @@
...
@@ -454,8 +447,7 @@
"z"
:
1
"z"
:
1
}
}
},
},
"multi"
:
true
,
"multi"
:
true
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
...
tests/SpecTests/transactions/causal-consistency.json
View file @
c1dc92cc
...
@@ -40,8 +40,7 @@
...
@@ -40,8 +40,7 @@
"$inc"
:
{
"$inc"
:
{
"count"
:
1
"count"
:
1
}
}
},
}
"upsert"
:
false
},
},
"result"
:
{
"result"
:
{
"matchedCount"
:
1
,
"matchedCount"
:
1
,
...
@@ -65,8 +64,7 @@
...
@@ -65,8 +64,7 @@
"$inc"
:
{
"$inc"
:
{
"count"
:
1
"count"
:
1
}
}
},
}
"upsert"
:
false
},
},
"result"
:
{
"result"
:
{
"matchedCount"
:
1
,
"matchedCount"
:
1
,
...
@@ -93,9 +91,7 @@
...
@@ -93,9 +91,7 @@
"$inc"
:
{
"$inc"
:
{
"count"
:
1
"count"
:
1
}
}
},
}
"multi"
:
false
,
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
@@ -123,9 +119,7 @@
...
@@ -123,9 +119,7 @@
"$inc"
:
{
"$inc"
:
{
"count"
:
1
"count"
:
1
}
}
},
}
"multi"
:
false
,
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
@@ -212,8 +206,7 @@
...
@@ -212,8 +206,7 @@
"$inc"
:
{
"$inc"
:
{
"count"
:
1
"count"
:
1
}
}
},
}
"upsert"
:
false
},
},
"result"
:
{
"result"
:
{
"matchedCount"
:
1
,
"matchedCount"
:
1
,
...
@@ -260,9 +253,7 @@
...
@@ -260,9 +253,7 @@
"$inc"
:
{
"$inc"
:
{
"count"
:
1
"count"
:
1
}
}
},
}
"multi"
:
false
,
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
...
tests/SpecTests/transactions/error-labels.json
View file @
c1dc92cc
...
@@ -42,7 +42,8 @@
...
@@ -42,7 +42,8 @@
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"TransientTransactionError"
,
"TransientTransactionError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
]
],
"errorContains"
:
"E11000"
}
}
},
},
{
{
...
@@ -407,6 +408,7 @@
...
@@ -407,6 +408,7 @@
"TransientTransactionError"
"TransientTransactionError"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
]
]
}
}
...
@@ -460,7 +462,7 @@
...
@@ -460,7 +462,7 @@
}
}
},
},
{
{
"description"
:
"add
transient
label to connection errors"
,
"description"
:
"add
TransientTransactionError
label to connection errors"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -662,7 +664,7 @@
...
@@ -662,7 +664,7 @@
}
}
},
},
{
{
"description"
:
"add
unknown commit label
to connection errors"
,
"description"
:
"add
RetryableWriteError and UnknownTransactionCommitResult labels
to connection errors"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -698,6 +700,7 @@
...
@@ -698,6 +700,7 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsContain"
:
[
"errorLabelsContain"
:
[
"RetryableWriteError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
...
@@ -800,7 +803,7 @@
...
@@ -800,7 +803,7 @@
}
}
},
},
{
{
"description"
:
"add
unknown commit label
to retryable commit errors"
,
"description"
:
"add
RetryableWriteError and UnknownTransactionCommitResult labels
to retryable commit errors"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -810,7 +813,10 @@
...
@@ -810,7 +813,10 @@
"failCommands"
:
[
"failCommands"
:
[
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
11602
"errorCode"
:
11602
,
"errorLabels"
:
[
"RetryableWriteError"
]
}
}
},
},
"operations"
:
[
"operations"
:
[
...
@@ -836,6 +842,7 @@
...
@@ -836,6 +842,7 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsContain"
:
[
"errorLabelsContain"
:
[
"RetryableWriteError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
...
@@ -938,7 +945,7 @@
...
@@ -938,7 +945,7 @@
}
}
},
},
{
{
"description"
:
"add
unknown commit label
to writeConcernError ShutdownInProgress"
,
"description"
:
"add
RetryableWriteError and UnknownTransactionCommitResult labels
to writeConcernError ShutdownInProgress"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -950,7 +957,10 @@
...
@@ -950,7 +957,10 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
91
,
"code"
:
91
,
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
,
"errorLabels"
:
[
"RetryableWriteError"
]
}
}
}
}
},
},
...
@@ -984,6 +994,7 @@
...
@@ -984,6 +994,7 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsContain"
:
[
"errorLabelsContain"
:
[
"RetryableWriteError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
...
@@ -1088,7 +1099,7 @@
...
@@ -1088,7 +1099,7 @@
}
}
},
},
{
{
"description"
:
"add
unknown commi
t label to writeConcernError WriteConcernFailed"
,
"description"
:
"add
UnknownTransactionCommitResul
t label to writeConcernError WriteConcernFailed"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -1137,6 +1148,7 @@
...
@@ -1137,6 +1148,7 @@
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"TransientTransactionError"
"TransientTransactionError"
]
]
}
}
...
@@ -1219,7 +1231,7 @@
...
@@ -1219,7 +1231,7 @@
}
}
},
},
{
{
"description"
:
"add
unknown commi
t label to writeConcernError WriteConcernFailed with wtimeout"
,
"description"
:
"add
UnknownTransactionCommitResul
t label to writeConcernError WriteConcernFailed with wtimeout"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -1272,6 +1284,7 @@
...
@@ -1272,6 +1284,7 @@
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"TransientTransactionError"
"TransientTransactionError"
]
]
}
}
...
@@ -1354,7 +1367,7 @@
...
@@ -1354,7 +1367,7 @@
}
}
},
},
{
{
"description"
:
"omit
unknown commit label to
writeConcernError UnsatisfiableWriteConcern"
,
"description"
:
"omit
UnknownTransactionCommitResult label from
writeConcernError UnsatisfiableWriteConcern"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -1400,6 +1413,7 @@
...
@@ -1400,6 +1413,7 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"TransientTransactionError"
,
"TransientTransactionError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
]
]
...
@@ -1460,7 +1474,7 @@
...
@@ -1460,7 +1474,7 @@
}
}
},
},
{
{
"description"
:
"omit
unknown commit label to
writeConcernError UnknownReplWriteConcern"
,
"description"
:
"omit
UnknownTransactionCommitResult label from
writeConcernError UnknownReplWriteConcern"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -1506,6 +1520,7 @@
...
@@ -1506,6 +1520,7 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteConcern"
,
"TransientTransactionError"
,
"TransientTransactionError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
]
]
...
@@ -1566,7 +1581,7 @@
...
@@ -1566,7 +1581,7 @@
}
}
},
},
{
{
"description"
:
"do not add
unknown commi
t label to MaxTimeMSExpired inside transactions"
,
"description"
:
"do not add
UnknownTransactionCommitResul
t label to MaxTimeMSExpired inside transactions"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -1613,6 +1628,7 @@
...
@@ -1613,6 +1628,7 @@
},
},
"result"
:
{
"result"
:
{
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"UnknownTransactionCommitResult"
,
"UnknownTransactionCommitResult"
,
"TransientTransactionError"
"TransientTransactionError"
]
]
...
@@ -1695,7 +1711,7 @@
...
@@ -1695,7 +1711,7 @@
}
}
},
},
{
{
"description"
:
"add
unknown commi
t label to MaxTimeMSExpired"
,
"description"
:
"add
UnknownTransactionCommitResul
t label to MaxTimeMSExpired"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -1742,6 +1758,7 @@
...
@@ -1742,6 +1758,7 @@
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"TransientTransactionError"
"TransientTransactionError"
]
]
}
}
...
@@ -1826,7 +1843,7 @@
...
@@ -1826,7 +1843,7 @@
}
}
},
},
{
{
"description"
:
"add
unknown commi
t label to writeConcernError MaxTimeMSExpired"
,
"description"
:
"add
UnknownTransactionCommitResul
t label to writeConcernError MaxTimeMSExpired"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -1876,6 +1893,7 @@
...
@@ -1876,6 +1893,7 @@
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"TransientTransactionError"
"TransientTransactionError"
]
]
}
}
...
...
tests/SpecTests/transactions/mongos-recovery-token.json
View file @
c1dc92cc
...
@@ -181,7 +181,10 @@
...
@@ -181,7 +181,10 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
91
,
"code"
:
91
,
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
,
"errorLabels"
:
[
"RetryableWriteError"
]
}
}
}
}
}
}
...
...
tests/SpecTests/transactions/pin-mongos.json
View file @
c1dc92cc
...
@@ -875,7 +875,7 @@
...
@@ -875,7 +875,7 @@
"failCommands"
:
[
"failCommands"
:
[
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
5
0
"errorCode"
:
5
1
}
}
}
}
}
}
...
@@ -887,7 +887,7 @@
...
@@ -887,7 +887,7 @@
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"TransientTransactionError"
"TransientTransactionError"
],
],
"errorCode"
:
5
0
"errorCode"
:
5
1
}
}
},
},
{
{
...
...
tests/SpecTests/transactions/read-concern.json
View file @
c1dc92cc
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
"arguments"
:
{
"arguments"
:
{
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
}
}
}
}
}
}
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
"cursor"
:
{},
"cursor"
:
{},
"lsid"
:
"session0"
,
"lsid"
:
"session0"
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"txnNumber"
:
{
"txnNumber"
:
{
"$numberLong"
:
"1"
"$numberLong"
:
"1"
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
"arguments"
:
{
"arguments"
:
{
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
}
}
}
}
}
}
...
@@ -274,7 +274,7 @@
...
@@ -274,7 +274,7 @@
"batchSize"
:
3
,
"batchSize"
:
3
,
"lsid"
:
"session0"
,
"lsid"
:
"session0"
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"txnNumber"
:
{
"txnNumber"
:
{
"$numberLong"
:
"1"
"$numberLong"
:
"1"
...
@@ -389,7 +389,7 @@
...
@@ -389,7 +389,7 @@
"arguments"
:
{
"arguments"
:
{
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
}
}
}
}
}
}
...
@@ -484,7 +484,7 @@
...
@@ -484,7 +484,7 @@
},
},
"lsid"
:
"session0"
,
"lsid"
:
"session0"
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"txnNumber"
:
{
"txnNumber"
:
{
"$numberLong"
:
"1"
"$numberLong"
:
"1"
...
@@ -608,7 +608,7 @@
...
@@ -608,7 +608,7 @@
"arguments"
:
{
"arguments"
:
{
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
}
}
}
}
}
}
...
@@ -664,7 +664,7 @@
...
@@ -664,7 +664,7 @@
"key"
:
"_id"
,
"key"
:
"_id"
,
"lsid"
:
"session0"
,
"lsid"
:
"session0"
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"txnNumber"
:
{
"txnNumber"
:
{
"$numberLong"
:
"1"
"$numberLong"
:
"1"
...
@@ -741,7 +741,7 @@
...
@@ -741,7 +741,7 @@
"arguments"
:
{
"arguments"
:
{
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
}
}
}
}
}
}
...
@@ -780,7 +780,7 @@
...
@@ -780,7 +780,7 @@
"find"
:
"test"
,
"find"
:
"test"
,
"lsid"
:
"session0"
,
"lsid"
:
"session0"
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"txnNumber"
:
{
"txnNumber"
:
{
"$numberLong"
:
"1"
"$numberLong"
:
"1"
...
...
tests/SpecTests/transactions/retryable-abort-errorLabels.json
0 → 100644
View file @
c1dc92cc
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.1"
,
"topology"
:
[
"replicaset"
,
"sharded"
]
}
],
"database_name"
:
"transaction-tests"
,
"collection_name"
:
"test"
,
"data"
:
[],
"tests"
:
[
{
"description"
:
"abortTransaction only retries once with RetryableWriteError from server"
,
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"times"
:
2
},
"data"
:
{
"failCommands"
:
[
"abortTransaction"
],
"errorCode"
:
112
,
"errorLabels"
:
[
"RetryableWriteError"
]
}
},
"operations"
:
[
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
1
}
},
"result"
:
{
"insertedId"
:
1
}
},
{
"name"
:
"abortTransaction"
,
"object"
:
"session0"
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
1
}
],
"ordered"
:
true
,
"readConcern"
:
null
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"abortTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"abortTransaction"
,
"database_name"
:
"admin"
}
},
{
"command_started_event"
:
{
"command"
:
{
"abortTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"abortTransaction"
,
"database_name"
:
"admin"
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[]
}
}
},
{
"description"
:
"abortTransaction does not retry without RetryableWriteError label"
,
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"times"
:
1
},
"data"
:
{
"failCommands"
:
[
"abortTransaction"
],
"errorCode"
:
11600
,
"errorLabels"
:
[]
}
},
"operations"
:
[
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
1
}
},
"result"
:
{
"insertedId"
:
1
}
},
{
"name"
:
"abortTransaction"
,
"object"
:
"session0"
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
1
}
],
"ordered"
:
true
,
"readConcern"
:
null
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"abortTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"abortTransaction"
,
"database_name"
:
"admin"
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[]
}
}
}
]
}
tests/SpecTests/transactions/retryable-abort.json
View file @
c1dc92cc
...
@@ -413,6 +413,9 @@
...
@@ -413,6 +413,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
10107
,
"errorCode"
:
10107
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -514,6 +517,9 @@
...
@@ -514,6 +517,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
13436
,
"errorCode"
:
13436
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -615,6 +621,9 @@
...
@@ -615,6 +621,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
13435
,
"errorCode"
:
13435
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -716,6 +725,9 @@
...
@@ -716,6 +725,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
11602
,
"errorCode"
:
11602
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -817,6 +829,9 @@
...
@@ -817,6 +829,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
11600
,
"errorCode"
:
11600
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -918,6 +933,9 @@
...
@@ -918,6 +933,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
189
,
"errorCode"
:
189
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1019,6 +1037,9 @@
...
@@ -1019,6 +1037,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
91
,
"errorCode"
:
91
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1120,6 +1141,9 @@
...
@@ -1120,6 +1141,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
7
,
"errorCode"
:
7
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1221,6 +1245,9 @@
...
@@ -1221,6 +1245,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
6
,
"errorCode"
:
6
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1322,6 +1349,9 @@
...
@@ -1322,6 +1349,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
9001
,
"errorCode"
:
9001
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1423,6 +1453,9 @@
...
@@ -1423,6 +1453,9 @@
"abortTransaction"
"abortTransaction"
],
],
"errorCode"
:
89
,
"errorCode"
:
89
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1525,6 +1558,9 @@
...
@@ -1525,6 +1558,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
11600
,
"code"
:
11600
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
@@ -1639,6 +1675,9 @@
...
@@ -1639,6 +1675,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
11602
,
"code"
:
11602
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
@@ -1753,6 +1792,9 @@
...
@@ -1753,6 +1792,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
189
,
"code"
:
189
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
@@ -1867,6 +1909,9 @@
...
@@ -1867,6 +1909,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
91
,
"code"
:
91
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
...
tests/SpecTests/transactions/retryable-commit-errorLabels.json
0 → 100644
View file @
c1dc92cc
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.1"
,
"topology"
:
[
"replicaset"
,
"sharded"
]
}
],
"database_name"
:
"transaction-tests"
,
"collection_name"
:
"test"
,
"data"
:
[],
"tests"
:
[
{
"description"
:
"commitTransaction does not retry error without RetryableWriteError label"
,
"clientOptions"
:
{
"retryWrites"
:
false
},
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"times"
:
1
},
"data"
:
{
"failCommands"
:
[
"commitTransaction"
],
"errorCode"
:
11600
,
"errorLabels"
:
[]
}
},
"operations"
:
[
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
1
}
},
"result"
:
{
"insertedId"
:
1
}
},
{
"name"
:
"commitTransaction"
,
"object"
:
"session0"
,
"result"
:
{
"errorLabelsOmit"
:
[
"RetryableWriteError"
,
"TransientTransactionError"
]
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
1
}
],
"ordered"
:
true
,
"readConcern"
:
null
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"commitTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"commitTransaction"
,
"database_name"
:
"admin"
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[]
}
}
},
{
"description"
:
"commitTransaction retries once with RetryableWriteError from server"
,
"clientOptions"
:
{
"retryWrites"
:
false
},
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"times"
:
1
},
"data"
:
{
"failCommands"
:
[
"commitTransaction"
],
"errorCode"
:
112
,
"errorLabels"
:
[
"RetryableWriteError"
]
}
},
"operations"
:
[
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
1
}
},
"result"
:
{
"insertedId"
:
1
}
},
{
"name"
:
"commitTransaction"
,
"object"
:
"session0"
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
1
}
],
"ordered"
:
true
,
"readConcern"
:
null
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"commitTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"writeConcern"
:
null
},
"command_name"
:
"commitTransaction"
,
"database_name"
:
"admin"
}
},
{
"command_started_event"
:
{
"command"
:
{
"commitTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"writeConcern"
:
{
"w"
:
"majority"
,
"wtimeout"
:
10000
}
},
"command_name"
:
"commitTransaction"
,
"database_name"
:
"admin"
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
}
]
}
}
}
]
}
tests/SpecTests/transactions/retryable-commit.json
View file @
c1dc92cc
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsContain"
:
[
"errorLabelsContain"
:
[
"RetryableWriteError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
...
@@ -207,6 +208,7 @@
...
@@ -207,6 +208,7 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsContain"
:
[
"errorLabelsContain"
:
[
"RetryableWriteError"
,
"UnknownTransactionCommitResult"
"UnknownTransactionCommitResult"
],
],
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
...
@@ -353,7 +355,9 @@
...
@@ -353,7 +355,9 @@
"result"
:
{
"result"
:
{
"errorCodeName"
:
"Interrupted"
,
"errorCodeName"
:
"Interrupted"
,
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"TransientTransactionError"
"RetryableWriteError"
,
"TransientTransactionError"
,
"UnknownTransactionCommitResult"
]
]
}
}
}
}
...
@@ -406,7 +410,7 @@
...
@@ -406,7 +410,7 @@
}
}
},
},
{
{
"description"
:
"commitTransaction
fails after WriteConcernError Interrupted
"
,
"description"
:
"commitTransaction
is not retried after UnsatisfiableWriteConcern error
"
,
"failPoint"
:
{
"failPoint"
:
{
"configureFailPoint"
:
"failCommand"
,
"configureFailPoint"
:
"failCommand"
,
"mode"
:
{
"mode"
:
{
...
@@ -417,8 +421,8 @@
...
@@ -417,8 +421,8 @@
"commitTransaction"
"commitTransaction"
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
1
1601
,
"code"
:
1
00
,
"errmsg"
:
"
operation was interrupted
"
"errmsg"
:
"
Not enough data-bearing nodes
"
}
}
}
}
},
},
...
@@ -452,7 +456,9 @@
...
@@ -452,7 +456,9 @@
"object"
:
"session0"
,
"object"
:
"session0"
,
"result"
:
{
"result"
:
{
"errorLabelsOmit"
:
[
"errorLabelsOmit"
:
[
"TransientTransactionError"
"RetryableWriteError"
,
"TransientTransactionError"
,
"UnknownTransactionCommitResult"
]
]
}
}
}
}
...
@@ -629,6 +635,9 @@
...
@@ -629,6 +635,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
10107
,
"errorCode"
:
10107
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -737,6 +746,9 @@
...
@@ -737,6 +746,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
13436
,
"errorCode"
:
13436
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -845,6 +857,9 @@
...
@@ -845,6 +857,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
13435
,
"errorCode"
:
13435
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -953,6 +968,9 @@
...
@@ -953,6 +968,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
11602
,
"errorCode"
:
11602
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1061,6 +1079,9 @@
...
@@ -1061,6 +1079,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
11600
,
"errorCode"
:
11600
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1169,6 +1190,9 @@
...
@@ -1169,6 +1190,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
189
,
"errorCode"
:
189
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1277,6 +1301,9 @@
...
@@ -1277,6 +1301,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
91
,
"errorCode"
:
91
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1385,6 +1412,9 @@
...
@@ -1385,6 +1412,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
7
,
"errorCode"
:
7
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1493,6 +1523,9 @@
...
@@ -1493,6 +1523,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
6
,
"errorCode"
:
6
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1601,6 +1634,9 @@
...
@@ -1601,6 +1634,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
9001
,
"errorCode"
:
9001
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1709,6 +1745,9 @@
...
@@ -1709,6 +1745,9 @@
"commitTransaction"
"commitTransaction"
],
],
"errorCode"
:
89
,
"errorCode"
:
89
,
"errorLabels"
:
[
"RetryableWriteError"
],
"closeConnection"
:
false
"closeConnection"
:
false
}
}
},
},
...
@@ -1818,6 +1857,9 @@
...
@@ -1818,6 +1857,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
11600
,
"code"
:
11600
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
@@ -1937,6 +1979,9 @@
...
@@ -1937,6 +1979,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
11602
,
"code"
:
11602
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
@@ -2056,6 +2101,9 @@
...
@@ -2056,6 +2101,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
189
,
"code"
:
189
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
@@ -2175,6 +2223,9 @@
...
@@ -2175,6 +2223,9 @@
],
],
"writeConcernError"
:
{
"writeConcernError"
:
{
"code"
:
91
,
"code"
:
91
,
"errorLabels"
:
[
"RetryableWriteError"
],
"errmsg"
:
"Replication is being shut down"
"errmsg"
:
"Replication is being shut down"
}
}
}
}
...
...
tests/SpecTests/transactions/transaction-options-repl.json
0 → 100644
View file @
c1dc92cc
{
"runOn"
:
[
{
"minServerVersion"
:
"4.0"
,
"topology"
:
[
"replicaset"
]
}
],
"database_name"
:
"transaction-tests"
,
"collection_name"
:
"test"
,
"data"
:
[],
"tests"
:
[
{
"description"
:
"readConcern snapshot in startTransaction options"
,
"sessionOptions"
:
{
"session0"
:
{
"defaultTransactionOptions"
:
{
"readConcern"
:
{
"level"
:
"majority"
}
}
}
},
"operations"
:
[
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
,
"arguments"
:
{
"options"
:
{
"readConcern"
:
{
"level"
:
"snapshot"
}
}
}
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
1
}
},
"result"
:
{
"insertedId"
:
1
}
},
{
"name"
:
"commitTransaction"
,
"object"
:
"session0"
},
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
,
"arguments"
:
{
"options"
:
{
"readConcern"
:
{
"level"
:
"snapshot"
}
}
}
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
2
}
},
"result"
:
{
"insertedId"
:
2
}
},
{
"name"
:
"abortTransaction"
,
"object"
:
"session0"
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
1
}
],
"ordered"
:
true
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"readConcern"
:
{
"level"
:
"snapshot"
},
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"commitTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"readConcern"
:
null
,
"writeConcern"
:
null
},
"command_name"
:
"commitTransaction"
,
"database_name"
:
"admin"
}
},
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
2
}
],
"ordered"
:
true
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"2"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"readConcern"
:
{
"level"
:
"snapshot"
,
"afterClusterTime"
:
42
},
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"abortTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"2"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"readConcern"
:
null
,
"writeConcern"
:
null
},
"command_name"
:
"abortTransaction"
,
"database_name"
:
"admin"
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
}
]
}
}
}
]
}
tests/SpecTests/transactions/transaction-options.json
View file @
c1dc92cc
...
@@ -322,7 +322,7 @@
...
@@ -322,7 +322,7 @@
"session0"
:
{
"session0"
:
{
"defaultTransactionOptions"
:
{
"defaultTransactionOptions"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
1
"w"
:
1
...
@@ -393,7 +393,7 @@
...
@@ -393,7 +393,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
null
"writeConcern"
:
null
},
},
...
@@ -438,7 +438,7 @@
...
@@ -438,7 +438,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
,
"level"
:
"
majority
"
,
"afterClusterTime"
:
42
"afterClusterTime"
:
42
},
},
"writeConcern"
:
null
"writeConcern"
:
null
...
@@ -487,7 +487,7 @@
...
@@ -487,7 +487,7 @@
"session0"
:
{
"session0"
:
{
"defaultTransactionOptions"
:
{
"defaultTransactionOptions"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
majority
"
"level"
:
"
snapshot
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
1
"w"
:
1
...
@@ -503,7 +503,7 @@
...
@@ -503,7 +503,7 @@
"arguments"
:
{
"arguments"
:
{
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
"majority"
"w"
:
"majority"
...
@@ -535,7 +535,7 @@
...
@@ -535,7 +535,7 @@
"arguments"
:
{
"arguments"
:
{
"options"
:
{
"options"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
"majority"
"w"
:
"majority"
...
@@ -579,7 +579,7 @@
...
@@ -579,7 +579,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
null
,
"writeConcern"
:
null
,
"maxTimeMS"
:
null
"maxTimeMS"
:
null
...
@@ -625,7 +625,7 @@
...
@@ -625,7 +625,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
,
"level"
:
"
majority
"
,
"afterClusterTime"
:
42
"afterClusterTime"
:
42
},
},
"writeConcern"
:
null
,
"writeConcern"
:
null
,
...
@@ -676,7 +676,7 @@
...
@@ -676,7 +676,7 @@
"session0"
:
{
"session0"
:
{
"defaultTransactionOptions"
:
{
"defaultTransactionOptions"
:
{
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
{
"writeConcern"
:
{
"w"
:
"majority"
"w"
:
"majority"
...
@@ -747,7 +747,7 @@
...
@@ -747,7 +747,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
"level"
:
"
majority
"
},
},
"writeConcern"
:
null
,
"writeConcern"
:
null
,
"maxTimeMS"
:
null
"maxTimeMS"
:
null
...
@@ -793,7 +793,7 @@
...
@@ -793,7 +793,7 @@
"startTransaction"
:
true
,
"startTransaction"
:
true
,
"autocommit"
:
false
,
"autocommit"
:
false
,
"readConcern"
:
{
"readConcern"
:
{
"level"
:
"
snapshot
"
,
"level"
:
"
majority
"
,
"afterClusterTime"
:
42
"afterClusterTime"
:
42
},
},
"writeConcern"
:
null
,
"writeConcern"
:
null
,
...
@@ -993,172 +993,6 @@
...
@@ -993,172 +993,6 @@
}
}
}
}
},
},
{
"description"
:
"readConcern snapshot in startTransaction options"
,
"sessionOptions"
:
{
"session0"
:
{
"defaultTransactionOptions"
:
{
"readConcern"
:
{
"level"
:
"majority"
}
}
}
},
"operations"
:
[
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
,
"arguments"
:
{
"options"
:
{
"readConcern"
:
{
"level"
:
"snapshot"
}
}
}
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
1
}
},
"result"
:
{
"insertedId"
:
1
}
},
{
"name"
:
"commitTransaction"
,
"object"
:
"session0"
},
{
"name"
:
"startTransaction"
,
"object"
:
"session0"
,
"arguments"
:
{
"options"
:
{
"readConcern"
:
{
"level"
:
"snapshot"
}
}
}
},
{
"name"
:
"insertOne"
,
"object"
:
"collection"
,
"arguments"
:
{
"session"
:
"session0"
,
"document"
:
{
"_id"
:
2
}
},
"result"
:
{
"insertedId"
:
2
}
},
{
"name"
:
"abortTransaction"
,
"object"
:
"session0"
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
1
}
],
"ordered"
:
true
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"readConcern"
:
{
"level"
:
"snapshot"
},
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"commitTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"1"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"readConcern"
:
null
,
"writeConcern"
:
null
},
"command_name"
:
"commitTransaction"
,
"database_name"
:
"admin"
}
},
{
"command_started_event"
:
{
"command"
:
{
"insert"
:
"test"
,
"documents"
:
[
{
"_id"
:
2
}
],
"ordered"
:
true
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"2"
},
"startTransaction"
:
true
,
"autocommit"
:
false
,
"readConcern"
:
{
"level"
:
"snapshot"
,
"afterClusterTime"
:
42
},
"writeConcern"
:
null
},
"command_name"
:
"insert"
,
"database_name"
:
"transaction-tests"
}
},
{
"command_started_event"
:
{
"command"
:
{
"abortTransaction"
:
1
,
"lsid"
:
"session0"
,
"txnNumber"
:
{
"$numberLong"
:
"2"
},
"startTransaction"
:
null
,
"autocommit"
:
false
,
"readConcern"
:
null
,
"writeConcern"
:
null
},
"command_name"
:
"abortTransaction"
,
"database_name"
:
"admin"
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
}
]
}
}
},
{
{
"description"
:
"client writeConcern ignored for bulk"
,
"description"
:
"client writeConcern ignored for bulk"
,
"clientOptions"
:
{
"clientOptions"
:
{
...
...
tests/SpecTests/transactions/update.json
View file @
c1dc92cc
...
@@ -116,7 +116,6 @@
...
@@ -116,7 +116,6 @@
"x"
:
1
"x"
:
1
}
}
},
},
"multi"
:
false
,
"upsert"
:
true
"upsert"
:
true
}
}
],
],
...
@@ -145,9 +144,7 @@
...
@@ -145,9 +144,7 @@
},
},
"u"
:
{
"u"
:
{
"y"
:
1
"y"
:
1
},
}
"multi"
:
false
,
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
@@ -179,8 +176,7 @@
...
@@ -179,8 +176,7 @@
"z"
:
1
"z"
:
1
}
}
},
},
"multi"
:
true
,
"multi"
:
true
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
@@ -346,7 +342,6 @@
...
@@ -346,7 +342,6 @@
"x"
:
1
"x"
:
1
}
}
},
},
"multi"
:
false
,
"upsert"
:
true
"upsert"
:
true
}
}
],
],
...
@@ -375,9 +370,7 @@
...
@@ -375,9 +370,7 @@
},
},
"u"
:
{
"u"
:
{
"y"
:
1
"y"
:
1
},
}
"multi"
:
false
,
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
@@ -409,8 +402,7 @@
...
@@ -409,8 +402,7 @@
"z"
:
1
"z"
:
1
}
}
},
},
"multi"
:
true
,
"multi"
:
true
"upsert"
:
false
}
}
],
],
"ordered"
:
true
,
"ordered"
:
true
,
...
...
tests/SpecTests/transactions/write-concern.json
View file @
c1dc92cc
...
@@ -877,7 +877,6 @@
...
@@ -877,7 +877,6 @@
"x"
:
1
"x"
:
1
}
}
},
},
"multi"
:
false
,
"upsert"
:
true
"upsert"
:
true
}
}
],
],
...
...
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