joao-r-reis commented on code in PR #1790:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1790#discussion_r2054390653
##########
conn.go:
##########
@@ -1898,16 +1898,14 @@ func (c *Conn) querySystemLocal(ctx context.Context)
*Iter {
func (c *Conn) awaitSchemaAgreement(ctx context.Context) (err error) {
const localSchemas = "SELECT schema_version FROM system.local WHERE
key='local'"
- var versions map[string]struct{}
+ versions := make(map[string]struct{})
var schemaVersion string
endDeadline := time.Now().Add(c.session.cfg.MaxWaitSchemaAgreement)
for time.Now().Before(endDeadline) {
iter := c.querySystemPeers(ctx, c.host.version)
- versions = make(map[string]struct{})
Review Comment:
why this change? resetting the map on each attempt made more sense to me
##########
disable_host_lookup_test.go:
##########
@@ -0,0 +1,39 @@
+package gocql
+
+import (
+ "net"
+ "testing"
+)
+
+func TestDisableHostLookupRingRefresh(t *testing.T) {
Review Comment:
can we not add this to an existing test file? Creating a new file just for
this test seems excessive. Also this is running in "unit tests" step because
it's missing the appropriate build flag at the top of the file. Also missing
license header.
##########
CHANGELOG.md:
##########
@@ -50,6 +50,10 @@ and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0
- Refactoring hostpool package test and Expose HostInfo creation (CASSGO-59)
+- Fix DisableInitialHostLookup flag ignored when querying system.peers
(CASSGO-5)
+
+- Fix DisableInitialHostLookup flag ignored when querying system.peers (PR
update) (CASSGO-5)
Review Comment:
duplicate entry?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]