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

keepalive: trace in case of success #1092

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

muzarski
Copy link
Contributor

@muzarski muzarski commented Oct 16, 2024

cpp-rust-driver tests sometimes depend on logs emitted by the driver. HeartbeatTests are on of them. Tests look for a following log: logger_.add_critera("Heartbeat completed on host " + ccm_->get_ip_prefix());.

Before this commit, rust-driver was not emitting any logs in case of keepalive request success. I think it's not a bad idea to add a trace log here, considering that keepalive intervals are rather long (default is 30s).

Obviously, the logger criteria will need to
be adjusted in cpp-rust-driver tests as well.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • [ ] I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have provided docstrings for the public items that I want to introduce.
  • [ ] I have adjusted the documentation in ./docs/source/.
  • [ ] I added appropriate Fixes: annotations to PR description.

cpp-rust-driver tests sometimes depend upon logs emitted by the driver.
HeartbeatTests are on of them. Tests look for a following log:
`logger_.add_critera("Heartbeat completed on host " + ccm_->get_ip_prefix());`.

Before this commit, rust-driver was not emitting any logs in case of
keepalive request success. I think it's not a bad idea to add a trace log
here, considering that keepalive intervals are rather long (default is 30s).

Obviously, the logger criteria will need to
be adjusted in `cpp-rust-driver` tests as well.
@muzarski muzarski requested review from wprzytula and Lorak-mmk and removed request for wprzytula October 16, 2024 13:31
@muzarski muzarski self-assigned this Oct 16, 2024
@muzarski muzarski added the cpp-rust-driver-p1 Functionality required by cpp-rust-driver label Oct 16, 2024
Copy link
Collaborator

@Lorak-mmk Lorak-mmk left a comment

Choose a reason for hiding this comment

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

Its a shame that there aren't more levels of logs. We could put this one in even lower level than trace.

Copy link

cargo semver-checks found no API-breaking changes in this PR! 🎉🥳
Checked commit: 3a0ca2e

@muzarski
Copy link
Contributor Author

Its a shame that there aren't more levels of logs. We could put this one in even lower level than trace.

Maybe there is some mechanism in tracing that would allow us to define some custom CCP_RUST_DRIVER_LOG_LEVEL or something similar. But this would need investigation if something like this exists.

@muzarski
Copy link
Contributor Author

Failed to apply group 0 change due to concurrent modification for retries::speculative_execution_panic_regression_test ...

@Lorak-mmk Lorak-mmk merged commit 1c24ca0 into scylladb:main Oct 16, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp-rust-driver-p1 Functionality required by cpp-rust-driver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants