Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make driver print warnings returned by server #383

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Jan 15, 2025

Time to time server provides usefull information in warnings.
Almost all drivers print it out, we need to make gocql do the same.

@dkropachev dkropachev force-pushed the dk/log-warnings-if-present branch 2 times, most recently from e36b33f to d0d3498 Compare January 15, 2025 17:20
control.go Outdated
Comment on lines 69 to 71
session: session,
quit: make(chan struct{}),
retry: &SimpleRetryPolicy{NumRetries: 3},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be in separate commit, not related to the change

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment on lines 21 to 30
type ExecutableQuery interface {
ExecutableQueryInterface

borrowForExecution() // Used to ensure that the query stays alive for lifetime of a particular execution goroutine.
releaseAfterExecution() // Used when a goroutine finishes its execution attempts, either with ok result or an error.
execute(ctx context.Context, conn *Conn) *Iter
attempt(keyspace string, end, start time.Time, iter *Iter, host *HostInfo)
retryPolicy() RetryPolicy
speculativeExecutionPolicy() SpeculativeExecutionPolicy
withContext(context.Context) ExecutableQuery
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this split to ExecutableQueryInterface and ExacutableQuery?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted this back, I wanted to make ExecutableQuery interface implementable

@dkropachev dkropachev force-pushed the dk/log-warnings-if-present branch from d0d3498 to cae9b90 Compare January 16, 2025 11:02
@dkropachev dkropachev force-pushed the dk/log-warnings-if-present branch from cae9b90 to f496ba2 Compare January 16, 2025 11:05
@dkropachev
Copy link
Collaborator Author

@sylwiaszunejko , please take a look again

@dkropachev dkropachev merged commit fe68ec3 into master Jan 16, 2025
2 checks passed
@dkropachev dkropachev deleted the dk/log-warnings-if-present branch January 16, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants