@@ -35,7 +35,7 @@ func GetNewClusterTime(
3535 logger ,
3636 func (_ * retry.Info ) error {
3737 var err error
38- clusterTime , err = fetchNewClusterTime (ctx , client )
38+ clusterTime , err = fetchClusterTime (ctx , client )
3939 return err
4040 },
4141 )
@@ -67,14 +67,15 @@ func GetNewClusterTime(
6767
6868// Use this when we just need the correct cluster time without
6969// actually changing any shards’ oplogs.
70- func fetchNewClusterTime (
70+ func fetchClusterTime (
7171 ctx context.Context ,
7272 client * mongo.Client ,
7373) (primitive.Timestamp , error ) {
7474 cmd , rawResponse , err := runAppendOplogNote (
7575 ctx ,
7676 client ,
7777 "expect StaleClusterTime error" ,
78+ primitive.Timestamp {1 , 0 },
7879 )
7980
8081 // We expect an error here; if we didn't get one then something is
@@ -102,7 +103,7 @@ func syncClusterTimeAcrossShards(
102103 ctx ,
103104 client ,
104105 "syncing cluster time" ,
105- bson. E { "maxClusterTime" , maxTime } ,
106+ maxTime ,
106107 )
107108
108109 if err != nil {
@@ -119,17 +120,15 @@ func runAppendOplogNote(
119120 ctx context.Context ,
120121 client * mongo.Client ,
121122 note string ,
122- extra ... bson. E ,
123+ maxClusterTime primitive. Timestamp ,
123124) (bson.D , bson.Raw , error ) {
124- cmd := append (
125- bson.D {
126- {"appendOplogNote" , 1 },
127- {"data" , bson.D {
128- {"migration-verifier" , note },
129- }},
130- },
131- extra ... ,
132- )
125+ cmd := bson.D {
126+ {"appendOplogNote" , 1 },
127+ {"maxClusterTime" , maxClusterTime },
128+ {"data" , bson.D {
129+ {"migration-verifier" , note },
130+ }},
131+ }
133132
134133 resp := client .
135134 Database (
0 commit comments