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

Open
Lorak-mmk opened this issue Jul 31, 2024 · 0 comments
Open

Change the way tablet support is checked in tests #1048

Lorak-mmk opened this issue Jul 31, 2024 · 0 comments
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants