joao-r-reis commented on code in PR #1868:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1868#discussion_r2035606353


##########
conn.go:
##########
@@ -1371,76 +1376,80 @@ func (c *Conn) executeQuery(ctx context.Context, qry 
*Query) *Iter {
                        value := values[i]
                        typ := info.request.columns[i].TypeInfo
                        if err := marshalQueryValue(typ, value, v); err != nil {
-                               return &Iter{err: err}
+                               iter.err = err
+                               return iter
                        }
                }
 
                // if the metadata was not present in the response then we 
should not skip it
-               params.skipMeta = !(c.session.cfg.DisableSkipMetadata || 
qry.disableSkipMetadata) && info != nil && info.response.flags&flagNoMetaData 
== 0
+               params.skipMeta = !(c.session.cfg.DisableSkipMetadata || 
qryOpts.disableSkipMetadata) && info != nil && 
info.response.flags&flagNoMetaData == 0
 
                frame = &writeExecuteFrame{
                        preparedID:    info.id,
                        params:        params,
-                       customPayload: qry.customPayload,
+                       customPayload: qryOpts.customPayload,
                }
 
                // Set "keyspace" and "table" property in the query if it is 
present in preparedMetadata
-               qry.routingInfo.mu.Lock()
-               qry.routingInfo.keyspace = info.request.keyspace
-               qry.routingInfo.table = info.request.table
-               qry.routingInfo.mu.Unlock()
+               q.routingInfo.mu.Lock()

Review Comment:
   So I made some changes to the `routingInfo` part but I didn't remove the 
struct... I think it still serves a purpose by making it clear that the mutex 
is used to protect access against the two fields within the struct. Do you 
still prefer to remove the struct and just have the mutex and two fields in the 
request type itself?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to