[GODRIVER-2651] Operation returns nil error if original and retry have `NoWritesPerformed` label Created: 09/Nov/22  Updated: 28/Oct/23  Resolved: 08/Dec/22

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.11.1

Type: Bug Priority: Unknown
Reporter: Kevin Albertson Assignee: Preston Vasquez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on DRIVERS-2501 Break NoWritesPerformed-Only Error Se... Implementing
Duplicate
is duplicated by GODRIVER-2670 Break NoWritesPerformed-Only Error Se... Closed
Problem/Incident
is caused by GODRIVER-2516 Propagate Original Error for Write Er... Closed
Related
related to DRIVERS-2501 Break NoWritesPerformed-Only Error Se... Implementing

 Description   

Summary

1. If both the original and retry return errors with the NoWritesPerformed label, the operation returns nil.

Here is a failing test reproducing the issue: https://github.com/kevinAlbs/mongo-go-driver/commit/ed23feeaaa69e7b7a47c2553c6a7866a595b57d9

2. The stored prevIndefiniteErr does not undergo further error processing. For example, the following is skipped when storing the prevIndefiniteErr:

if batching && len(tt.WriteErrors) > 0 && currIndex > 0 {
	for i := range tt.WriteErrors {
		tt.WriteErrors[i].Index += int64(currIndex)
	}
}

That may result in incorrect Index if the prevIndefiniteErr is returned.



 Comments   
Comment by Githook User [ 08/Dec/22 ]

Author:

{'name': 'Preston Vasquez', 'email': '24281431+prestonvasquez@users.noreply.github.com', 'username': 'prestonvasquez'}

Message: GODRIVER-2651 Break NoWritesPerformed-Only Error Sequence (#1135)

Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>
Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com>
Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>
Branch: release/1.11
https://github.com/mongodb/mongo-go-driver/commit/19f3fb91471cf8c6b7bec6f8e464768365701789

Comment by Githook User [ 08/Dec/22 ]

Author:

{'name': 'Preston Vasquez', 'email': '24281431+prestonvasquez@users.noreply.github.com', 'username': 'prestonvasquez'}

Message: Release/1.11 (#1146)

  • GODRIVER-2651 Break NoWritesPerformed-Only Error Sequence (#1135)

Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>
Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com>
Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>

  • GODRIVER-2333 Assert that Ping op succeeds initial DNS spec tests (#1124)
  • GODRIVER-2577 Retry heartbeat on timeout to prevent pool cleanup in FAAS pause. (#1133)
  • resolve merge conflicts

Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>
Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com>
Branch: release/1.11
https://github.com/mongodb/mongo-go-driver/commit/bf833d5bf49f33f81d495576a370431990ddfed7

Comment by Githook User [ 08/Dec/22 ]

Author:

{'name': 'Preston Vasquez', 'email': '24281431+prestonvasquez@users.noreply.github.com', 'username': 'prestonvasquez'}

Message: GODRIVER-2651 Break NoWritesPerformed-Only Error Sequence (#1135)

Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>
Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com>
Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/13ffe8d72344f92f7f5720b678c99bf77736c580

Generated at Thu Feb 08 08:39:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.