Skip to content

Commit 53c5730

Browse files
committed
WIP
1 parent 5c9f226 commit 53c5730

File tree

5 files changed

+3
-18
lines changed

5 files changed

+3
-18
lines changed

x/mongo/driver/auth/auth.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func (ah *authHandshaker) GetHandshakeInformation(
103103
AppName(ah.options.AppName).
104104
Compressors(ah.options.Compressors).
105105
SASLSupportedMechs(ah.options.DBUser).
106-
ClusterClock(ah.options.ClusterClock).
107106
ServerAPI(ah.options.ServerAPI).
108107
LoadBalanced(ah.options.LoadBalanced).
109108
OuterLibraryName(ah.options.OuterLibraryName).

x/mongo/driver/operation.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,9 @@ func (op Operation) readWireMessage(ctx context.Context, conn *mnet.Connection)
11051105
res, err := op.decodeResult(opcode, rem)
11061106
// Update cluster/operation time and recovery tokens before handling the error to ensure we're properly updating
11071107
// everything.
1108-
op.updateClusterTimes(res)
1108+
if op.Clock != nil {
1109+
op.updateClusterTimes(res)
1110+
}
11091111
op.updateOperationTime(res)
11101112
op.Client.UpdateRecoveryToken(bson.Raw(res))
11111113

x/mongo/driver/operation/hello.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"go.mongodb.org/mongo-driver/v2/x/mongo/driver"
2727
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/description"
2828
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet"
29-
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/session"
3029
)
3130

3231
// maxClientMetadataSize is the maximum size of the client metadata document
@@ -44,7 +43,6 @@ type Hello struct {
4443
compressors []string
4544
saslSupportedMechs string
4645
d driver.Deployment
47-
clock *session.ClusterClock
4846
speculativeAuth bsoncore.Document
4947
topologyVersion *description.TopologyVersion
5048
maxAwaitTimeMS *int64
@@ -71,16 +69,6 @@ func (h *Hello) AppName(appname string) *Hello {
7169
return h
7270
}
7371

74-
// ClusterClock sets the cluster clock for this operation.
75-
func (h *Hello) ClusterClock(clock *session.ClusterClock) *Hello {
76-
if h == nil {
77-
h = new(Hello)
78-
}
79-
80-
h.clock = clock
81-
return h
82-
}
83-
8472
// Compressors sets the compressors that can be used.
8573
func (h *Hello) Compressors(compressors []string) *Hello {
8674
h.compressors = compressors
@@ -629,7 +617,6 @@ func isLegacyHandshake(srvAPI *driver.ServerAPIOptions, loadbalanced bool) bool
629617

630618
func (h *Hello) createOperation() driver.Operation {
631619
op := driver.Operation{
632-
Clock: h.clock,
633620
CommandFn: h.command,
634621
Database: "admin",
635622
Deployment: h.d,
@@ -662,7 +649,6 @@ func (h *Hello) GetHandshakeInformation(ctx context.Context, _ address.Address,
662649
deployment := driver.SingleConnectionDeployment{C: conn}
663650

664651
op := driver.Operation{
665-
Clock: h.clock,
666652
CommandFn: h.handshakeCommand,
667653
Deployment: deployment,
668654
Database: "admin",

x/mongo/driver/topology/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ func (s *Server) setupHeartbeatConnection(ctx context.Context) error {
842842
func (s *Server) createBaseOperation(conn *mnet.Connection) *operation.Hello {
843843
return operation.
844844
NewHello().
845-
ClusterClock(s.cfg.clock).
846845
Deployment(driver.SingleConnectionDeployment{C: conn}).
847846
ServerAPI(s.cfg.serverAPI)
848847
}

x/mongo/driver/topology/topology_options.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ func NewConfigFromOptionsWithAuthenticator(opts *options.ClientOptions, clock *s
290290
return operation.NewHello().
291291
AppName(appName).
292292
Compressors(comps).
293-
ClusterClock(clock).
294293
ServerAPI(serverAPI).
295294
LoadBalanced(loadBalanced).
296295
OuterLibraryName(outerLibraryName).

0 commit comments

Comments
 (0)