-
Notifications
You must be signed in to change notification settings - Fork 1
Exclude read concern commands #31
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
Conversation
WalkthroughAdds public constant Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/Client.php (1)
100-106: Consider adding test coverage for readConcern exclusion logic.The new exclusion list prevents readConcern from being applied to
getMoreandkillCursorscommands. Since this is a behavioral change in how the client handles readConcern, consider adding tests to verify:
- Commands in the exclusion list don't receive readConcern even when causal consistency is enabled
- Other commands still properly receive readConcern when appropriate
- The exclusion works correctly both inside and outside transactions
Run the following script to check current usage of these commands:
#!/bin/bash # Description: Find usage of getMore and killCursors to understand test coverage needs # Search for getMore usage echo "=== getMore usage ===" rg -n --type=php -C3 'COMMAND_GET_MORE|getMore\(' # Search for killCursors usage echo "=== killCursors usage ===" rg -n --type=php -C3 'COMMAND_KILL_CURSORS|killCursors' # Check test files echo "=== Test files ===" fd -e php test
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/Client.php(3 hunks)tests/TransactionTest.php(0 hunks)
💤 Files with no reviewable changes (1)
- tests/TransactionTest.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Tests
🔇 Additional comments (1)
src/Client.php (1)
69-69: LGTM! Constant addition is correct.The new
COMMAND_KILL_CURSORSconstant follows the established pattern and correctly represents MongoDB's killCursors command.
Co-authored-by: Jake Barnby <[email protected]>
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.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/Client.php (1)
100-106: Fix typo in property name and comment.The property name contains a typo:
readConcernNotSupporteedCommandsshould bereadConcernNotSupportedCommands. Additionally, the comment has an extra space between "support" and "readConcern".
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Client.php(3 hunks)
🧰 Additional context used
🪛 GitHub Actions: CodeQL
src/Client.php
[error] 333-333: PHPStan: Syntax error, unexpected T_IF on line 333.
🪛 GitHub Actions: Linter
src/Client.php
[error] 3-3: Parse error: syntax error, unexpected token "if" on line 3. This occurred during linting (Pint) after running Composer install.
🪛 PHPStan (2.1.31)
src/Client.php
333-333: Syntax error, unexpected T_IF on line 333
(phpstan.parse)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Tests
🔇 Additional comments (1)
src/Client.php (1)
69-69: LGTM!The new constant follows the established naming convention and correctly defines the killCursors command.
Summary by CodeRabbit