Skip to content
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

RetriableWrite operations are not retriable #2554

Open
AlexNesvat opened this issue Jul 7, 2023 · 0 comments
Open

RetriableWrite operations are not retriable #2554

AlexNesvat opened this issue Jul 7, 2023 · 0 comments
Assignees

Comments

@AlexNesvat
Copy link

  • Laravel-mongodb Version: 3.9.5
  • PHP Version: 8.1.9
  • Database Driver & Version: 1.14.0

Description:

Perviously I created a PR with improvement for retriable write operations. Link: PR
According to provided comment I was able to verify that our configuration meets the requirements, but still retry writes are not executed and we still continue facing this issue, while Atlas cluster scale up/down or other reasons while Primary node changes.
We receiving an error and query are not retriable, which was verified by comparing actual result with expected data to be stored in database.

Our current options of connection string
mongodb+srv://user:password@host/database-name?retryWrites=true&w=majority&serverSelectionTryOnce=false&serverSelectionTimeoutMS=600000

MongoDB version: 6.0

Driver version: PHPC 1.14

Steps to reproduce

  1. Create a loop with write operations to mongodb cluster.
  2. Trigger a scale up/down cluster or run a failover test during query execution.
  3. Check logs with not primary exception and verify that query was not failed and data was not stored and retry write operation was not performed.

Expected behaviour

During switch of Primary node write operations should be retried.

Actual behaviour

During switch of Primary node write operations fails with one of the retriable error codes.

Logs: Insert log.txt here (if necessary)
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

No branches or pull requests

2 participants