Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions source/transactions/tests/unified/findOneAndReplace.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions source/transactions/tests/unified/findOneAndReplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ tests:
findAndModify: *collection_name
query: { _id: 3 }
update: { x: 1 }
new: false
new: { $$unsetOrMatches: false }
lsid: { $$sessionLsid: *session0 }
txnNumber: { $numberLong: '1' }
startTransaction: true
Expand Down Expand Up @@ -178,7 +178,7 @@ tests:
findAndModify: *collection_name
query: { _id: 3 }
update: { x: 1 }
new: false
new: { $$unsetOrMatches: false }
lsid: { $$sessionLsid: *session0 }
txnNumber: { $numberLong: '1' }
startTransaction: true
Expand Down
16 changes: 12 additions & 4 deletions source/transactions/tests/unified/findOneAndUpdate.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions source/transactions/tests/unified/findOneAndUpdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ tests:
findAndModify: *collection_name
query: { _id: 3 }
update: { $inc: { x: 1 } }
new: false
new: { $$unsetOrMatches: false }
lsid: { $$sessionLsid: *session0 }
txnNumber: { $numberLong: '1' }
startTransaction: true
Expand Down Expand Up @@ -173,7 +173,7 @@ tests:
findAndModify: *collection_name
query: { _id: 3 }
update: { $inc: { x: 1 } }
new: false
new: { $$unsetOrMatches: false }
lsid: { $$sessionLsid: *session0 }
txnNumber: { $numberLong: '2' }
startTransaction: true
Expand Down Expand Up @@ -201,7 +201,7 @@ tests:
findAndModify: *collection_name
query: { _id: 3 }
update: { $inc: { x: 1 } }
new: false
new: { $$unsetOrMatches: false }
lsid: { $$sessionLsid: *session0 }
txnNumber: { $numberLong: '3' }
startTransaction: true
Expand Down Expand Up @@ -277,7 +277,7 @@ tests:
findAndModify: *collection_name
query: { _id: 3 }
update: { $inc: { x: 1 } }
new: false
new: { $$unsetOrMatches: false }
lsid: { $$sessionLsid: *session0 }
txnNumber: { $numberLong: '1' }
startTransaction: true
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions source/transactions/tests/unified/mongos-recovery-token.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ tests:
# flight heartbeat refreshes the first mongoes' SDAM state in between
# the initial commitTransaction and the retry attempt.
heartbeatFrequencyMS: 30000
appName: &appName transactionsClient
observeEvents:
- commandStartedEvent
- database:
Expand Down Expand Up @@ -195,6 +196,7 @@ tests:
- isMaster
- hello
closeConnection: true
appName: *appName
# The first commitTransaction sees a retryable connection error due to
# the fail point and also fails on the server. The retry attempt on a
# new mongos will wait for the transaction to timeout and will fail
Expand Down
6 changes: 4 additions & 2 deletions source/transactions/tests/unified/pin-mongos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions source/transactions/tests/unified/pin-mongos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ tests:
# flight heartbeat refreshes the first mongoes' SDAM state in between
# the insert connection error and the single commit attempt.
heartbeatFrequencyMS: 30000
appName: &appName transactionsClient
observeEvents:
- commandStartedEvent
- database:
Expand Down Expand Up @@ -572,6 +573,7 @@ tests:
- isMaster
- hello
closeConnection: true
appName: *appName
Copy link
Member

@ShaneHarvey ShaneHarvey Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these transaction test changes look good. I believe we couldn't use this feature originally because of this server bug: SERVER-49336. Can you confirm that these tests pass on current 4.2 and up servers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the tests are green.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 2 possible fixes for now: use appName with additional connection for failPoints OR simply wait for all failPoints to be processed and then remove fialPoint (the second approach makes us waste around of 3-4 seconds waiting)

-
object: *collection1
name: insertOne
Expand Down
8 changes: 6 additions & 2 deletions source/transactions/tests/unified/write-concern.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions source/transactions/tests/unified/write-concern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ tests:
findAndModify: *collection_name
query: { _id: 0 }
update: { x: 1 }
new: false
new: { $$unsetOrMatches: false }
<<: *transactionCommandArgs
commandName: findAndModify
databaseName: *database_name
Expand Down Expand Up @@ -642,7 +642,7 @@ tests:
findAndModify: *collection_name
query: { _id: 0 }
update: { $inc: { x: 1 } }
new: false
new: { $$unsetOrMatches: false }
<<: *transactionCommandArgs
commandName: findAndModify
databaseName: *database_name
Expand Down
Loading