Skip to content

Commit 10837f4

Browse files
committed
undo retry.go changes
1 parent 1b699f3 commit 10837f4

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

internal/retry/retry.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ import (
1111
"go.mongodb.org/mongo-driver/bson"
1212
)
1313

14-
// RunForUUIDAndTransientErrors should never be used. Its presence here
15-
// is a vestige of the retryer's origin in mongosync. Since migration-verifier
16-
// forbids DDL operations, a namespace should be just as stable as its UUID; thus,
17-
// this function is needless complexity.
18-
//
19-
// This function retries f() for the CollectionUUIDMismatch error and for transient errors.
14+
// RunForUUIDAndTransientErrors retries f() for the CollectionUUIDMismatch error and for transient errors.
2015
// This should be used to run a driver operation that optionally specifies the `collectionUUID` parameter
2116
// for a collection that may have been:
2217
//
@@ -39,20 +34,15 @@ import (
3934
// f() is provided with a collection name string, which is the one that should be used in the body
4035
// of f() when a collection name is needed. The initial value of this string is expectedCollName.
4136
//
42-
// This function always returns the collection's current name. It returns
37+
// RunForUUIDAndTransientErrors always returns the collection's current name. It returns
4338
// an error if the duration limit is reached, or if f() returns a non-transient error.
4439
func (r *Retryer) RunForUUIDAndTransientErrors(
4540
ctx context.Context, logger *logger.Logger, expectedCollName string, f func(*Info, string) error,
4641
) (string, error) {
4742
return r.runRetryLoop(ctx, logger, expectedCollName, f, true, true)
4843
}
4944

50-
// RunForUUIDErrorOnly should never be used. Its presence here
51-
// is a vestige of the retryer's origin in mongosync. Since migration-verifier
52-
// forbids DDL operations, a namespace should be just as stable as its UUID; thus,
53-
// this function is needless complexity.
54-
//
55-
// This function retries f() for the CollectionUUIDMismatch error only. This should primarily
45+
// RunForUUIDErrorOnly retries f() for the CollectionUUIDMismatch error only. This should primarily
5646
// be used to wrap a transaction callback containing an operation that specifies the `collectionUUID`
5747
// parameter for a collection that may have been:
5848
//
@@ -67,7 +57,7 @@ func (r *Retryer) RunForUUIDAndTransientErrors(
6757
// f() is provided with a collection name string, which is the one that should be used in the body
6858
// of f() where a collection name is needed. The initial value of this string is expectedCollName.
6959
//
70-
// This function returns the collection's current name in all cases.
60+
// RunForUUIDErrorOnly returns the collection's current name in all cases.
7161
func (r *Retryer) RunForUUIDErrorOnly(
7262
ctx context.Context, logger *logger.Logger, expectedCollName string, f func(*Info, string) error,
7363
) (string, error) {

0 commit comments

Comments
 (0)