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

Change the way tablet support is checked in tests #1048

Closed
Lorak-mmk opened this issue Jul 31, 2024 · 0 comments · Fixed by #1102
Closed

Change the way tablet support is checked in tests #1048

Lorak-mmk opened this issue Jul 31, 2024 · 0 comments · Fixed by #1102
Milestone

Comments

@Lorak-mmk
Copy link
Collaborator

It is possible for Scylla to support tablets, but for them to be disabled in config.
In that case our current check:

pub async fn scylla_supports_tablets(session: &Session) -> bool {
    let result = session
        .query(
            "select column_name from system_schema.columns where 
                keyspace_name = 'system_schema'
                and table_name = 'scylla_keyspaces'
                and column_name = 'initial_tablets'",
            &[],
        )
        .await
        .unwrap();
    result.single_row().is_ok()
}

will succeed, but it will not be possible to create a tablets table. It will fail with message like this:

Unique name: test_rust_1721129687_11
thread '<unnamed>' panicked at scylla/tests/integration/tablets.rs:264:10:
called `Result::unwrap()` on an `Err` value: DbError(ConfigError, "Tablet replication is not enabled")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tablets::test_default_policy_is_tablet_aware' panicked at scylla/tests/integration/tablets.rs:288:1:
explicit panic

We should check this differently. @michoecho suggested checking TABLETS cluster feature.
We have a supports_feature function for this.

@Lorak-mmk Lorak-mmk added the good first issue Good for newcomers label Jul 31, 2024
@wprzytula wprzytula added this to the 1.0.0 milestone Jul 31, 2024
Lorak-mmk added a commit to Lorak-mmk/scylla-rust-driver that referenced this issue Nov 4, 2024
Fixes: scylladb#1048

See the issue description for more information.
Lorak-mmk added a commit to Lorak-mmk/scylla-rust-driver that referenced this issue Nov 4, 2024
Fixes: scylladb#1048

See the issue description for more information.
Lorak-mmk added a commit to Lorak-mmk/scylla-rust-driver that referenced this issue Nov 5, 2024
Fixes: scylladb#1048

See the issue description for more information.
Lorak-mmk added a commit to Lorak-mmk/scylla-rust-driver that referenced this issue Nov 20, 2024
Fixes: scylladb#1048

See the issue description for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants