Skip to content

Move initial data creation back to where it was #1320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jyemin
Copy link
Collaborator

@jyemin jyemin commented Feb 28, 2024

JAVA-5334

When I merged the previous fix to JAVA-5334 into the JAVA-4171 PR, all the sharded variants started timing out. I got as far as learning that, after that merge, for many of the new unified transaction tests (particular ones in mongos-pin-auto) the drop command would block for 90 seconds before completing successfully. After ruling out all the other possibilities, I found that by moving the initial data creation below entity creation (where it was before), and then advancing the session cluster times after that, the drop command issues went away.

@ShaneHarvey wondering if you have any insight into what might be going on here.

@ShaneHarvey
Copy link
Member

ShaneHarvey commented Feb 28, 2024

the drop command would block for 90 seconds before completing successfully

This indicates the drop command is blocking waiting for an open transaction to time out (transactionLifetimeLimitSeconds). My theory is that when you moved the drop earlier it made it use a earlier clusterTime which ends up blocking on the transaction. Moving it later, the drop ends up using a later clusterTime which kills/overrides the transaction. This is just a guess though and I would need to test it out to verify.

@jyemin
Copy link
Collaborator Author

jyemin commented Feb 28, 2024

Ah, so maybe this isn't needed, but for https://github.com/mongodb/mongo-java-driver/pull/1310/files#diff-a746e25fe11a43c11ef4cf1d65ce45fe37c6597e31f0772d4f628de5f7b36bc8R225 the call to killAllSessions just needs to move above the call to addInitialData

@jyemin
Copy link
Collaborator Author

jyemin commented Feb 28, 2024

I tried it, it works locally. Once I test successfully on the JAVA-4171 PR, I will close this PR.

Thanks Shane.

@jyemin
Copy link
Collaborator Author

jyemin commented Feb 28, 2024

Looks good on the other PR. Closing this out.

@jyemin jyemin closed this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants