-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
test(NODE-6626): implement integration tests for improved client.close() - server-side #4367
base: main
Are you sure you want to change the base?
Conversation
34ccf67
to
804c464
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment about unskipping tests that pass, and some optional comments. Otherwise LGTM
ddb638d
to
13a8a25
Compare
The base branch was changed.
author Aditi Khare <aditi.khare@mongodb.com> 1734376794 -0500 committer Aditi Khare <aditi.khare@mongodb.com> 1737656635 -0500 parent 70d476a author Aditi Khare <aditi.khare@mongodb.com> 1734376794 -0500 committer Aditi Khare <aditi.khare@mongodb.com> 1737656626 -0500 parent 70d476a author Aditi Khare <aditi.khare@mongodb.com> 1734376794 -0500 committer Aditi Khare <aditi.khare@mongodb.com> 1737656617 -0500 parent 70d476a author Aditi Khare <aditi.khare@mongodb.com> 1734376794 -0500 committer Aditi Khare <aditi.khare@mongodb.com> 1737656617 -0500 parent 70d476a author Aditi Khare <aditi.khare@mongodb.com> 1734376794 -0500 committer Aditi Khare <aditi.khare@mongodb.com> 1737656613 -0500 parent 70d476a author Aditi Khare <aditi.khare@mongodb.com> 1734376794 -0500 committer Aditi Khare <aditi.khare@mongodb.com> 1737656583 -0500 parent 70d476a author Aditi Khare <aditi.khare@mongodb.com> 1734376794 -0500 committer Aditi Khare <aditi.khare@mongodb.com> 1737656581 -0500 skeleton skeleton updates refactor for table fix remove misc file clean up Delete logs.txt requested changes: additional expectation remove extra file ready for review server selection test fix
e34d285
to
d36e661
Compare
8adfee6
to
08d8c26
Compare
145c987
to
ba68560
Compare
txn test fix 2 lint
9712d52
to
6a70114
Compare
7348d39
to
74673f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the server-side ServerSession is cleaned up by client.close():"
test is failing, this one we can unskip but I think the issue is something with the namespace already/not existing?
@nbbeeken Error should be gone now but I'll wait for tests to pass on full CI before re-requesting review. I'm skipping the sessions tests on versions < 4.2 since that's what the $currentOp API requires to detect idleSessions |
ecc387b
to
35435db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If CI is green, LGTM!
); | ||
const isCursor = (r) => ((r.type === 'idleCursor') || (r.type === 'op' && r.desc === 'getMore')); | ||
return res.cursor.firstBatch.filter(r => isCursor(r) && r.ns === 'close.cursorCleanUp'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we address the outstanding cursors this found? seems like client.close() isn't doing what it promises to if we are seeing cursors from other tests here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I reverted the changes, and I'll look into the outstanding cursors
f11de93
to
f53ecc6
Compare
f031f94
to
e6aac85
Compare
5dea817
to
25fc9a6
Compare
02183c2
to
1d3fd91
Compare
@@ -1061,6 +1059,8 @@ export abstract class AbstractCursor< | |||
if (!this.cursorSession?.inTransaction()) { | |||
maybeClearPinnedConnection(this.cursorSession, { error }); | |||
} | |||
this.cursorId = Long.ZERO; | |||
this.isKilled = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that this related to fixing the server side issue. We've changed the meaning of killed include cursors that didn't actually run kill cursors
/**
* A `killCursors` command was attempted on this cursor.
* This is performed if the cursor id is non zero.
*/
I'm not sure that's a change we can make here, maybe there's another approach to whatever moving this variable addressed?
Description
Add server-side resource integration tests for client.close(). These tests will remain skipped until improved client.close() is implemented.
What is changing?
Is there new documentation needed for these changes?
No
What is the motivation for this change?
Improved client.close()
Release Highlight
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript